Take butter out of fridge to come to room temperature.
If using vanilla bean: make a lengthwise slit with a paring knife, scrape the seeds out and add, along with the pods, to a medium heavy saucepan.
Pour the milk into the saucepan and bring just to a boil while stirring with a whisk. Remove pan from heat.
Meanwhile, in a separate large bowl, stir the cornstarch and flour into the sugar, then add the egg yolks and whisk until smooth.
Temper the egg yolks: While whisking nonstop, slowly pour or spoon in around half of the hot milk mixture into the egg yolk mixture.
Pour it all backinto the saucepan, remove the vanilla bean, and bring to a gentle boil while stirring with a whisk, making sure to get the bottom and corners of the pot. Keep stirring until thick, around 8-10 minutes. (Note: the cream will continue to thicken as it cools.)
If using vanilla extract: add now.
Stir in the butter.
Let Cool: Pour the cream into a bowl and let cool for 20 minutes before refrigerating. For a faster cooling time: plunge the bowl into icy water, vigorously whisk until cool and refrigerate immediately.
Notes
Yield:2 cups/500ml (Enough for one 9½"/24cm tart)
For a stronger vanilla flavor, add the vanilla bean to the milk the night before and refrigerate. (Slit the vanilla bean and add its paste of seeds along with the bean pod.)
Vanilla Bean: Can be rinsed, dried and stored in a jar of sugar for later use.
Optional Straining: To remove lumps or ensure an ultra-smooth consistency, you can strain the thickened pastry cream, while still warm, through a large fine-mesh strainer.
To Keep the Cream Thick: Avoid stirring after refrigeration, as it will break down the starch bonds and become thinner.
Storage: Stays well for up to 3 days in the fridge in an airtight container. To help prevent the formation of a film on top, place plastic wrap directly on the surface of the cream. Does not freeze well.
Variations
Starch: Can use all flour, or a combination of starch and flour. Potato starch works in a pinch, but tends to thin more easily if stirred once off the heat.
Salt: To enhance flavor, stir in a pinch of salt with the starch.
Citrus: Can substitute lemon zest in place of vanilla (or try orange zest).