Line a tart or flan dish with parchment or rub the edges with butter and pre-heat the oven.
Put the flour and butter into a large bowl. Use a fork or pastry blender to work them together until the mixture resembles fine breadcrumbs.
Stir in the sugar.
Add the egg yolks and stir well.
Using your hands gather the mix together to form a smooth ball of pastry dough.
Roll out the dough between two pieces of parchment or film, remove the film and transfer it to the prepared dish. Or simply press the dough into the dish using your fingers.
Cut away any pastry that hangs over the edge of the dish.
Prick the pastry all over with a fork.
Chill until required.
Lay a large piece of parchment over the raw pastry, making sure all the edges are covered.
Scatter ceramic baking beans (or rice or flour) over the parchment, spreading them all over the surface.
If the pastry is to have a cold filling, bake for 15-18 minutes then remove from the oven and carefully lift the parchment and contents off the pastry. Return the pastry to the oven and cook for a further 5-6 minutes. Fill according to your recipe.
If the pastry is to be filled and cooked again, bake for 10-12 minutes then remove from the oven, carefully lift the parchment and contents off the pastry and return it to the oven and cook for a further 4-5 minutes without browning too much.