To prepare for this dish you need to desalt the cod 24 hours in advance. Do this by soaking the flaked salt cod in a large bowl of cold water, changing the water every 6 hours if possible.
Heat 2 tbsp of the olive oil in a sauté pan and cook the onion for 5 minutes, then add the garlic and cook until everything is transparent, not golden - about 5 minutes more.