For the pastry, in a food processor, pulse the cold diced butter with flour and salt for a few seconds until it resembles a bread crumb mixture. Add the beaten egg and then the ice-cold water 1 tbsp at a time, pulsing until it just comes together in a ball. Remove and pat down into a thick pancake, wrap in reusable baking paper and place in the freezer for 15 minutes. Or you could do this step in advance and leave in the fridge for 30 minutes or more.
Meanwhile, in a small bowl, mix the ricotta with 1 grated garlic clove, ½ the herbs and ½ the grated cheese and the lemon zest and season to taste with some salt and pepper.
Preheat the oven and a baking tray to 180°C. In a large frying pan, melt the butter and add the olive oil and fry the finely chopped shallot for 8 minutes, stirring from time to time.
Add the mushrooms and let them fry for 5 minutes. Add the garlic, sea salt and pepper and thyme, stir and let everything fry for another few minutes until the mushrooms are tender then take off the heat and check the seasoning.
Roll the chilled pastry out between two pieces of floured reusable baking paper to 5mm rotating regularly to ensure the pastry is in an event circle. Spoon the ricotta mixture in the middle of the circle and spread it out, leaving a 5cm border.
Evenly place the mushroom mix on top of the ricotta mix, then fold in the border of the remaining pastry to form the galette. Patch up any bits that might need patching up, then beat the egg in a bowl and brush all over the pastry with the beaten egg using a brush or your finger.
Bake for 25 minutes until the pastry is golden. Let it cool on the tray for 10 minutes and then carefully move to a wire rack to cool for another 20 minutes. Finish by sprinkling over the rest of the herbs and the rest of the cheese.