Heat a pan over a medium heat and add the oil.When hot add the onions and garlic and cook for about 1 minute.Add the chopped tomatoes.Continue to cook over a medium heat, stirring every few minutes until the tomatoes have broken down and are soft.Remove from the heat and add basil and salt and pepper.Blitz in a blender or with a stick blender until smooth,Serve immediately.