Preheat the oven to 350°F (175°C).
Line an 8×8 inch baking pan with parchment paper or lightly grease it.
Make the crust: In a bowl, whisk together the flour, powdered sugar, and salt. Add the cold cubed butter and chopped pistachios. Use a pastry cutter or your fingers to blend until coarse crumbs form.
Press this crust mixture firmly and evenly into the bottom of the prepared pan.
Bake the crust for 12–15 minutes until lightly golden; remove from the oven and set aside.
Prepare the filling: In a separate bowl, gently toss the blackberries with sugar, lemon juice, and cornstarch until coated.
Spread the blackberry mixture evenly over the warm crust.
In another bowl, make the crumble topping: combine the flour, powdered sugar, softened butter, and pinch of salt. Blend until crumbly.
Sprinkle the crumble evenly over the blackberry layer, then scatter the roughly chopped pistachios on top if using.
Bake for 25–30 minutes until the filling is bubbling and the topping is golden.
Allow the bars to cool completely in the pan on a cooling rack before slicing into squares.