Pastry cream is used when cream properties are not suitable for the purpose of the dessert such as it sitting around for a long time. Pastry cream will not cause baked products to go soggy.
Heat the milk with the vanilla bean split in two in a saucepan over medium heat.
Whisk the sugar and egg yolks in a bowl until the mixture acquires a white colour.
Gradually add the sifted flour and stir with a whisk until smooth. Add half of the warm milk and mix well. Pour into the saucepan containing the remaining milk and bring slowly to boil stirring constantly. Remove from the heat when the mixture thickens.
To avoid a skin to form on top of the pastry cream put butter on top of the cream and let it cool down.