Heat your oven to 300°F. Line an 8-inch or 9-inch square cake pan with parchment paper (no need to grease).
You can make this with either a stand mixer or a food processor (I prefer the food processor, it is SO easy).
<b>If using a stand mixer,</b> beat the butter, sugar, and salt together until the butter is soft, scraping frequently. If you're using a flavoring, add that now, along with the flour. Mix just until combined, scraping down the bowl again.
<b>If using a food processor,</b> combine the powdered sugar, salt, and flour in the food processor, pulsing a few times. Then add your flavoring (if using) and the butter and pulse several times to chop the butter down into smaller pieces.
Then, run the machine until it is fully incorporated, coming together in a smooth mass---1 to 2 minutes more. Scrape the sides and bottom of the bowl a few times for even mixing. On the extremely rare occasion it just will NOT come together, add a tablespoon or two of milk. This has only happened to me once.
Once you have your dough, add to baking pan in chunks. Use your hands to press the dough evenly into the pan, then something flat (like the bottom of a water glass) to smooth the top.
Bake for 20-25 minutes, then remove from the oven (leave the oven on) to do the initial shaping/cutting. We'll be making 2 or 3 columns (I prefer 3) in one direction, and then 8 thin bars (just shy of 1 inch) in the other direction.
If you want them to look more like store-bought, use the back of a thin wooden skewer to press across the surface (outlining slightly indented lines). This isn't necessary, see my notes above in the post.
Then use a sharp knife or multipurpose scraper tool to cut along those lines to the bottom of the pan. If you choose, dock the cookies all over with the back of the skewer (for bigger dots) or the pointy end (for smaller holes).
Then return to the oven for another 25 to 35 minutes, until the cookies have a deep golden edge but are mostly pale across the top. Because many ovens are unreliable (running either hot or cold at this lower temp), you need to keep an eye on them for the last 10 to 15 minutes so they don’t overbake, but also to make sure that they're really done.
Let the shortbread cool in the pan (for at least 10 minutes), then remove the parchment paper from the pan and break the cookies apart. Them them finish cooling on a rack.
These should keep for a week (maybe longer) at room temperature in a sealed container. They should freeze well too, if wrapped tightly (double layer plastic wrap/bag).