Get Ready to Bake! Preheat your oven to 350°F (175°C). Line a 9x9-inch baking dish with parchment paper, leaving some overhang on the sides – this makes lifting out the cookies super easy later!
Cream the Butter & Sugar: In a mixing bowl (a stand mixer works great!), beat together the softened butter and confectioner's sugar until the mixture is light, fluffy, and smooth.
Add Flavor: Stir in the vanilla extract now, if you're using it, for that extra warmth.
Mix in Flour: With your mixer on a low speed, gradually add the flour (and salt, if using). Mix just until everything comes together and a soft, crumbly dough forms. Be careful not to overmix!
Press and Prick: Gently press the dough evenly into your prepared baking dish. Use a fork to poke holes all over the surface of the dough – this classic step helps the shortbread bake perfectly.
Bake to Golden: Pop it into the preheated oven and bake for about 25-30 minutes, or until the edges are beautifully golden-brown.
Cool and Cut: Take the shortbread out of the oven. While it's still warm, carefully slice it into your desired cookie bar shapes right in the pan. Let it cool completely before lifting the bars out and enjoying your delicious, homemade shortbread!