Heat the oil in a small frying pan.
Add the onion and fry until soft but not coloured.
Add the garlic and chilli and cook for a further minute.
Add the sugar and stir until dissolved.
Add the tomato ketchup and heat through.
Store in the fridge for up 1 week in a clean jar.