1.Preheat oven to 350 degrees, spray a 9 inch square baking pan with cooking spray and set aside. Note: You can use a 9 X 13 inch pan for a thinner cake.
2.In a large mixing bowl, mix together the cake mix and pudding with a whisk to break up any clumps.
3.Add in milk and whisk until combined. Add vanilla, salt and egg if using.
4.Take some of the batter out with a measuring cup. Less than half the batter. About 3/4 cup. Mix in the cocoa powder until completely combined.
5.Toss in about 1/4 cup M&Ms into the large batter and mix gently.
6.Pour large batter into prepared pan then top off with the small chocolate batter. Top with the rest of the M&M chips.
7.Bake for about 30-35 minutes or until top springs back and a toothpick comes out clean or with dry crumbs. If you want, toss with a few more M&Ms on top. Let cool on wire rack for at least 30 minutes.
Cut into squares and dig in. Enjoy!