Wash spinach and cut into small pieces. Slightly cook with half a cup of water and a bit of salt over medium heat for a few minutes. Drain water (using the back of a spoon to squeeze extra water from spinach).
Fry onions in oil in a non-stick pan until golden. Add spinach and fry for a few more minutes. Flatten the surface using the back of a spoon and break the eggs on top, taking care not to break the yoke. Add salt and pepper and cover the pan until eggs are cooked but the yoke should remain soft.