Heat the olive oil in a large frying pan over low heat. Halve and thinly slice the onions, then place them into the pan.
Cook, stirring occasionally, for about two hours. During this time the onions will slowly become translucent, then turn a light golden colour. They should reduce by at least half. If you see any browning, reduce the heat.
Once the onions have caramelised, add the salt and pepper. Stir to incorporate, then add the wine. Stir through, cook for another five minutes, then remove from the heat.
Use the onions as you’d like, or refrigerate for up to a week in an airtight container. Freeze up to one month.
If you don't drink wine or have it in the house, balsamic vinegar is an ideal sub for the red wine. Replace the full amount of wine with one tablespoon of balsamic vinegar.