Marie les (=des cadeaux) a achetés. -- Marie bought them (=some presents).
As you can see, the pronoun les refers to des cadeaux and functions as the COD in the sentence. With the COD preceding the participle (achetés), the participle needs to match the COD in number and gender.
Here's a lesson on this: https://progress.lawlessfrench.com/revision/grammar/special-cases-when-the-past-participle-agrees-in-number-and-gender-when-used-with-avoir-in-le-passe-compose-conversational-past
Sign in to submit your answer
Don't have an account yet? Join today
Test your French to the CEFR standard