Slightly cook the spinach with 1/2 cup of water and a bit of salt over medium heat for about 10 minutes. Drain and squeeze out all of the excess liquid from the spinach in a colander with the back of a spoon. Set aside.
Heat vegetable oil in a non-stick pan over medium heat. Add the onions and saute until slightly golden. Add the drained spinach and garlic; cook for a few more minutes,about 5 minutes. Flatten the surface using the back of a spoon. Break the eggs on top, taking care not to break the yoke. Add salt and pepper. Cover the pan and cook until eggs are cooked but the yoke should remain soft.