Preheat the oven to 190°C.
Roll out the pastry to approx 0.5-1cm thickness and cut into a square large enough to fill a flan tin. Place the pastry square over the flan tin and gently press into the bottom and the fluted sides ensuring that no holes are made in the pastry.
Do not cut off any overhanging pastry at this stage. Prick the base all over with a fork and then cut a square of nonstick baking paper to go on top of the pastry; pour some blind baking beans on top of the baking paper. Place the flan tin in the oven on top of a baking tray and bake for 15 minutes.
Crack the eggs into a bowl and beat, and then mix in the crème fraîche. Grate 100g of the cheese and add to the egg mixture along with the torn basil, salt and pepper. Mix to combine.
After 15 minutes, remove the flan tins from the oven and cut off the surplus pastry with a knife. Crumble the remaining cheese into the bottom of the flan tins, add the ham and cover with the egg mixture.
Bake in the oven for approx 20-25 minutes until the egg mixture has set and is golden on top.
Freezing and defrosting guidelines
Once the dish has cooled completely, transfer it to an airtight, freezer-safe container, seal and freeze for up to 1-3 months. To serve, defrost thoroughly in the fridge overnight before reheating. Loosely cover with foil and bake until dish is thoroughly heated through. Reheat until piping hot.
For top tips on protecting you and your family when preparing raw meat and poultry, visit Food Safety in the Home and view the full Food safety at home video.