Preheat oven to 350°F (175°C). Lightly grease an 8-inch square baking pan.
Whisk together the flour, baking powder, and salt. Set aside.
Using an electric mixer on medium speed, beat the butter, sugar, and brown sugar until light and fluffy. Add the peanut butter and mix well. Mix in the egg and vanilla.
Reduce mixer speed to low. Gradually add the flour mixture, mixing until almost blended. Stir in the M&Ms.
Transfer the batter to the prepared pan. Bake 25-30 minutes, or until the edges are lightly browned and a pick inserted into the center comes out with a few moist crumbs. Cool in the pan on a wire rack before cutting into bars.