Preheat the oven to 375°F. Spray 9-inch pie dish with non-stick cooking spray.
In a stand mixer fitted with a paddle attachment, cream together 1/2 cup butter, 1/2 cup brown sugar, and 1/2 cup granulated sugars on high 1 minute, until combined. Add 2 eggs and 1 teaspoon vanilla then mix until combined.
Add 2 cups flour, 1/2 teaspoon baking soda, and 1/4 teaspoon salt and mix just until combined. Fold in 1/2 cup chocolate chips and 1/2 cup M&M’s.
Press dough evenly into the pie dish. Top with extra M&M's, if desired.
Bake 18 to 22 minutes, or until the edges are barely golden brown and the cookie is set. Cool completely before removing from pie dish and frosting.
Chocolate Buttercream Frosting
In a stand mixer fitted with a paddle attachment, cream 1/4 cup butter on high for 30 seconds.
Add 1/2 cup powdered sugar, 2 Tablespoons cocoa powder, 1/2 Tablespoon half-and-half, and 1 teaspoon vanilla then mix on medium speed. Add another 1/2 cup powdered sugar and 1/2 Tablespoon half-and-half and mix until combined. Add the remaining 1/2 cup powdered sugar and 1/2 tablespoon half-and-half, and mix until the frosting is smooth and holds its shape. If needed, add more powdered sugar to thicken or more half-and-half to thin it.
Topping
Using a piping bag, pipe the frosting around the edge of the cake. Decorate with M&Ms, if desired.
Notes
Variations: Make this cookie cake your own by swapping out the M&M's and chocolate chips for whatever your sweet tooth is craving; i.e. toffee bits, candy bars (roughly chopped), nuts, dried fruit, peanut butter chips, etc. The same goes the frosting flavor and how you decorate. Have fun with it.
Alternative baking dish: An 8- or 9-inch round cake pan or square baking dish will work in place of the pie dish, but it may alter the baking time so keep a close eye on it in the oven.