Take the puff pastry out of the freezer and let thaw to room temperature.
Meanwhile slice the courgette and place in a single layer on kitchen paper. Sprinkle with salt and let sit for 30 minutes. Pat dry with kitchen paper and dust away the salt (this is to draw out the excess moisture in the courgette).
Combine ricotta, Parmesan and mozzarella in a bowl. Season with salt and pepper to taste. In a second bowl whisk together olive oil and garlic.
Preheat oven to 200 C / Gas 6. Grease a shallow baking dish.
Line the prepared baking dish with puff pastry. Spread cheese mixture on top, layer with courgette slices and sprinkle with garlic oil.
In a small bowl whisk together egg yolk and 1 tablespoon cold water and brush the pastry edges.
Bake for 30 to 40 minutes until puff pastry is golden brown. Remove from the oven and let rest for 5 minutes. Sprinkle with basil and serve.
Parmesan cheese is not truly vegetarian, as it contains animal rennet. To make this dish 100% vegetarian, omit the cheese or find a suitable vegetarian substitute made without animal rennet. In supermarkets look for the 'parmesan style hard cheeses' which are suitable for vegetarians.