Preheat the oven to 350 degrees F. Spray a 9 inch round cake pan with a non-stick baking spray.
In a large mixing bowl, beat together ½ cup softened butter, ½ cup packed brown sugar and ¼ cup granulated sugar until light and creamy.
Beat in 2 large eggs and 1 teaspoon vanilla extract until fully combined.
Add 1½ cups all-purpose flour, ½ teaspoon baking soda and ½ teaspoon salt. Mix just until combined.
Fold in 1 cup of the M&M's.
Press the cookie dough evenly into the prepared cake pan.
Sprinkle the remaining 1 cup M&M's over the top and gently press them into the dough.
Bake for 20 to 25 minutes, or until the edges are lightly golden and the center is just set. Be careful not to overbake, as the cookie cake will continue cooking while it cools.
Allow the cookie cake to cool completely in the pan before frosting.
For the Frosting:
In a medium mixing bowl, beat together ¼ cup softened unsalted butter and 3 tablespoons cocoa powder until smooth.
Gradually mix in 1½ cups powdered sugar.
Add 1 teaspoon vanilla extract.
Slowly mix in 2 tablespoons milk until the frosting is smooth and creamy.
Transfer the frosting to a piping bag fitted with a star tip and pipe it around the edge of the cooled cookie cake.
Top with additional M&M's, if desired.
Slice into 8 servings and enjoy!
Notes
This cake can be made in a 9 inch pie pan as well. Make sure not to over mix the cookie dough or the cookie cake will be tough. Store the leftovers covered at room temperature for up to 4 days.