Prepare the Pastry
Preheat oven to 350°F (175°C).
Roll out the puff or shortcrust pastry and bake according to package instructions until lightly golden.
Let pastry cool completely.
Make the Custard
In a saucepan, combine milk, cream, and sugar. Heat gently over medium heat.
In a small bowl, mix cornstarch with a few tablespoons of cold milk until smooth.
Slowly whisk cornstarch mixture into the warm milk mixture.
Stir constantly until thickened into a silky custard.
Remove from heat and stir in vanilla extract and butter.
Assemble the Squares
Pour custard over the cooled pastry and spread evenly.
Chill in the refrigerator for at least 2 hours until set.
Serve
Cut into squares with a sharp knife.
Dust with powdered sugar before serving.