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 the butter with brown sugar and granulated sugar until creamy. Then add in the egg and vanilla extract.
Mix in the baking soda and salt. Then slowly add in the flour until just combined.
Gently stir in half of the M&Ms.
Press the cookie dough batter into the prepared pan and then press the remaining M&Ms on top.
Bake for 20-25 minutes or until the edges are just starting to turn slightly golden brown. Be careful not to overcook. It’s better to unmake the cookie dough than over bake it as the cake will continue to cook as it cools.
Let the cake cool completely before adding the frosting.
For the Frosting:
While the cake is cooling, prepare the frosting. Beat the butter and cocoa powder together with a hand held mixture until smooth. Then slowly add in the powdered sugar. Add in the vanilla extract and slowly add in the milk until creamy.
Pipe the frosting with a star tip onto the edges of the cookie cake and top with more M&Ms if you prefer.
Then the cake is ready to slice, serve 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.