Preheat the oven to 350°F (180°C). Lightly grease a 9-inch (23 cm) square pan with butter and line it with parchment paper, leaving a slight overhang.
Use an electric mixer to cream the butter and sugar on high speed until pale yellow, about 1 minute.
Scrape down the sides of the bowl, then sift in the flour and add the salt. Mix on low speed until coarse crumbles form.
Dump the crumbs into the prepared pan, spread them evenly with your hands, and press firmly into a compact layer. Bake for 22 to 24 minutes, or until the edges are golden.
While the crust bakes, place the pumpkin purée, sweetened condensed milk, eggs, pumpkin pie spice, salt, and vanilla in the same bowl. Beat on high speed until smooth and creamy, scraping the sides once during mixing.
Remove the pan from the oven and immediately pour the filling over the hot crust. Smooth the surface with a spatula so the filling reaches the corners.
Return the pan to the oven and bake for 35 to 37 minutes, or until the centre is set and no longer wobbly.
Cool the bars in the pan on a wire rack, then lift them out using the parchment overhang. Slice into squares once fully cooled.
Notes
Use a digital kitchen scale for accurate measurements and an oven thermometer to be sure your oven is heating properly.
Make sure your butter is at room temperature so it creams properly with the sugar for the crust.
Let the bars cool fully in the pan before lifting them out to prevent cracking or sagging.
Storage
Keep the bars covered in the fridge for up to five days. They can also be frozen in an airtight container for up to one month.