Preheat oven to 350°. Line two muffin tins with 18 paper liners.
Add cupcake ingredients to the bowl of an electric mixer. Beat well, about 3 minutes, scraping the bowl occasionally.
Divide batter evenly between muffin tin. Bake for 18 to 22 minutes, or until a toothpick comes out clean. Let cool completely.
Using a large round tip, pipe buttercream in a swirl onto the cupcakes. Draw a black line around the surface of the frosting. Stick M&Ms vertically into the side of the cupcakes.