First make the pastry: Tip the flour into a large mixing bowl.
Add the margarine or butter and rub in gently with the fingertips until the mixture resembles fine breadcrumbs.
Add three tablespoons of cold water until the pastry comes together in a ball.
Roll out the dough on a lightly floured surface and use it to line a 20 centimetre loose-bottomed flan tin. Ideally, use a fluted tin.
Chill in the fridge for 30 minutes.
Meanwhile, preheat the oven to 220°C.
Blind bake the pastry case by pricking it all over with a fork, to prevent air bubbles forming.
Line the base and sides with baking parchment and weigh it down with baking beans.
Place on a baking sheet and bake for 10 minutes.
Remove the beans and paper and bake the empty case for a further 10 minutes, or until the base is lightly brown.
Trim the overhanging pastry.
Reduce the oven temperature to 180°C.
Crisp the bacon in a sauté pan over a medium heat for 10 minutes, as shown below.
Transfer to the cooled pastry case with a slotted spoon. Leave the juices in the pan.
Place the onion in the pan and cook over a medium heat for eight minutes, or until golden.
Add to the quiche and top with the cheese.
In a bowl, combine the eggs, cream, salt, and pepper, then pour into the quiche.
Bake for 25 to 30 minutes until golden and just set.
Be careful not to overcook the quiche, or the filling will become tough and full of holes.