Drain the spinach and squeeze out all the water with your hands.
Fry the onion in the oil until golden. Add the garlic and when it begins to colour, add the spinach and salt and pepper to taste. Cook gently, turning the spinach over until it crumples into a soft mass. Let it cool.
Mix with the yogurt in a bowl and chill before serving.