Preheat your oven to 200C (400F). And heat an oven-proof frying pan on a medium high heat. Peel and finely slice onion into 1/2 moons. Add a super generous glug of olive oil to the pan and cook onion, stirring often until soft and golden.
Remove pan from the heat. Pat the spinach with paper towel or squeeze to remove any extra moisture but don’t stress too much. Stir spinach into the onion. Make 4 little holes for your eggs with a spoon. Crack an egg into each hole.
Bake eggs, uncovered for 5-10 minutes or until egg whites are set and yolks are still a little runny.
When eggs are cooked, drizzle pesto over the top and crumble over feta.