Brown butter first by placing butter in a medium saucepan over medium heat and swirling until completely melted. Once it begins to boil, keep swirling the pot until foaming subsides and butter is deep golden brown. Watch it closely so it doesn't burn.
Pour the butter into a small heat-safe bowl and place in the refrigerator to cool.
Preheat oven to 325 degrees. Butter and flour two 12-inch heart-shaped pans, two rectangular (9 by 13-inch) pans, two 12-inch cast iron skillets, or one large (half sheet) pan and set aside.
Cream brown butter and brown sugar on low speed in mixer bowl (stand or handheld) until combined. Increase speed to medium-high and beat for about 4-5 minutes, until very fluffy and light in color. Scrape down sides and bottom of bowl.
On low speed, add eggs, vanilla, and rum (if using) and mix to combine. Scrape down sides and bottom of bowl and blend for about 1 minute on medium speed.
In another bowl, whisk together flour, baking soda, and salt. With mixer on low speed, slowly add flour mixture to butter and egg mixture until combined.
Remove bowl from mixer and stir in M&M's and chocolate chips or chunks by hand.
Press dough into two 12-inch heart-shaped buttered and floured pans.
Bake at 325 for 15 minutes and no longer. Remove from the oven and transfer to a cooling rack to cool.
Make buttercream as per recipe instructions. Pipe onto cookie cake as desired and top with sprinkles, if desired.
*These can be frozen, either baked or unbaked. To freeze unbaked, press dough into cookie sheets and place in freezer until solid. Wrap well. When you want fresh-baked cookie cakes, proceed with recipe as per instructions, adding about 5 minutes to baking time.