Add the cubed cold butter and work into the flour. You can either use a pastry cutter or work with your hands. If you're using your hands, you have to work fast so as not to melt the butter. Rub in all the butter in the flour until you have a coarse mixture with small pebbles of butter. This process can be also done in a food processor.
Slowly start adding a tablespoon at a time of cold water, while forming a smooth dough. Your dough might require less or more water.
Once the dough is ready, wrap into some cling film and store in the fridge for at least an hour or two.
While the dough is resting in the fridge, prepare your filling.
In a large pan heat the olive oil and add the diced onion. Let it cook for a few minutes until it starts getting translucent. Add the fresh spinach* and the chili flakes, let it wilt and cook until most of the excess water has vapoured. Season with salt and pepper to taste.
Let the mixture cool completely and drain from any excess juices.
In a bowl mix together the ricotta, egg, and the spinach mixture. Season everything with salt and pepper to taste.
Preheat the oven to 200°C or 400°F. Line a baking tray with parchment paper. Set aside.
On a floured surface open the dough into a large circle of about 5mm thickness.
Place the mixture in the middle of the dough. Spread it into an even layer and leave a 5cm border all round. Fold the edges to roughly cover some of the filling.
Brush the edges with the egg wash and optionally sprinkle some sesame seeds.
Bake for about 40 minutes or until the edges have a nice golden brown colour.
Let it cool slightly before serving. Enjoy!
*If using frozen spinach it’s important to let it thaw before adding to the mixture and drain from any excess water already in the spinach.