A CLASSIC pastry cream—the creamy filling used in éclairs and Napoleons, as the base for most dessert soufflés, and as the filling for many fruit tarts—is made by boiling milk, flour, sugar, and egg yolks together until a smooth, thick, and creamy sauce is formed.
One of the most common mistakes in making a pastry cream is to undercook it. People generally stop cooking when the pastry cream first comes to a boil. If you follow the method below and cook and whisk the pastry cream an additional minute or two, you will notice a dramatic change in its consistency. The pastry cream will become shiny, smoother, and thinner, instead of thick and pasty, with the disagreeable raw-flour taste of an undercooked pastry cream.
Since many people do not cook this pastry cream sufficiently, I am including another, widely used version, using cornstarch. I normally use the classic version because I prefer the taste. However, you may find the recipe with cornstarch easier to make because it requires less cooking time. If it is undercooked, it will not have the grainy taste that the flour-based recipe would have.
Pastry cream will keep, well covered with plastic wrap, for several days in the refrigerator, and it can be frozen.