Preheat the oven on the broiler setting. Add the onions to the oil remaining in the pan. If there isn’t any, add in about ½ teaspoon and sauté the onion for 2-3 minutes until they soften, add the garlic and let cook for 30 seconds. Add the crushed tomatoes, Italian seasoning, red pepper flakes, dried basil, and pesto and stir to combine. When the sauce reaches a simmer, add a ¼ cup of water, lower the heat, cover and allow to simmer for 10-12 minutes or until the sauce thickens a bit. Season with pepper to taste.