Preheat oven to 350 degrees and line your 9x9 square baking pan (alternately, you can use an 8x8 pan as well—the bars will be thicker) with parchment paper or foil. Set aside.
With a hand mixer or a standing mixer (you can do this by hand as well), cream the butter until light and fluffy.
Add in the granulated sugar and the brown sugar. Mix until well combined.
Add in the egg, mixing until combined.
Next, add in vanilla extract and mix.
Add in flour, baking soda, salt and espresso powder (if using). Mix until just combined.
Finally, add in chocolate chips and M&Ms and mix until combined.
Press dough into the prepared baking dish in an even layer.
Bake in the oven for 25-28 minutes, or until the tops of the cookie bars are lightly golden brown and the center is not jiggly when the pan is moved gently (alternately, you can use a cake tester to test the center of the bars. If the cake tester comes out clean with just a few crumbs stuck to it, the bars are done).
Allow the bars to cool 5 minutes before adding the chocolates on top. Press the chocolates into the cookies lightly. Sprinkle with sea salt, if desired.
Allow the cookies to cool at least 20-30 minutes more before cutting into squares.
Enjoy!