Beat butter and sugars together until fluffy (about 5 minutes). Add the egg and vanilla and beat for another minute until well incorporated.
Slow the mixer to the lowest speed and add dry ingredients. Stir in M&M's.
Roll the dough into balls making sure the M&M's are inside the balls, not touching the bottom of the tins and place in to well greased muffin tins. Press a few more M&M's into the tops on the balls if you like.
Bake at 180 degrees celcius for 12-15 minutes, checking after 10 minutes. Let the cookie cups cool completely in the muffin tins before running a butter knife around the edges tp remove.
Store in an airtight container for 10 days. Cookie cups will also freeze well