In a large skillet, heat the oil over medium heat. Add the onions and garlic and fry for 20 minutes, stirring occasionally to prevent burning, until the onions are soft and brown.
Add the spinach, cover and steam for 5 to 10 minutes, until the spinach is wilted.
Remove from heat and let cool for 10 to 15 minutes; transfer to a mixing bowl.