With an electric mixer beat the butter, peanut butter, and brown sugar until light and creamy. Add vanilla extract and eggs, mixing after each.
Add the flour, baking soda, and salt and mix until just combined. Add the M&Ms.
Spread the cookie dough into the prepared pan and bake until edges are golden brown and middle is puffed, 25-30 minutes.
For best results and prettiest slices, let cool completely before slicing. Once cool, use parchment paper to lift bars out of pan and transfer to a cutting board. Cut into 16 equal pieces.