Preheat your oven to 350 degrees Fahrenheit.
In a large mixing bowl or in the bowl of a stand mixer, cream together the softened butter, margarine, brown sugar, and granulated sugar until light and creamy.
Add the egg, egg yolk and vanilla into the cookie dough and beat again until just combined.
Add the peanut butter and beat again.
Add the flour, baking soda, and salt and beat until just combined. Do not overmix.
Finally, add the M&Ms and mix into the dough with a wooden spoon or spatula until evenly dispersed.
Scoop the cookie dough onto a parchment-paper lined cookie sheet using a #40 cookie scoop (2 Tbsp worth of dough).
Bake in the preheated oven for 8-10 minutes or until the edges turn brown but the centers are still soft.
Allow the cookies to cool on the baking sheet for a few minutes. After 5 minutes, transfer the cookies to a wire rack to cool the rest of the way.
Serve and enjoy!