Preheat the oven to 200°C (400°F).
Place halved tomatoes on a baking dish. Cut the top off the whole garlic head, exposing the cloves, and place it next to the tomatoes.
Drizzle with olive oil and season with salt and pepper.
Roast in the preheated oven for about 20 minutes. Remove from the oven, cover the baking dish with kitchen foil and place back in the oven for 10 minutes or until the tomatoes are blistered, caramelized, and the garlic is soft.
While the tomatoes and garlic are roasting, cook the pasta al dente in heavily salted water according to the package instructions. Reserve about 240ml (1 cup) of pasta cooking water before draining. (Please note: Don't add the whole cup of pasta water to the sauce, follow the instructions below)
Once roasted, squeeze the soft garlic cloves out of the skin and transfer them to a blender along with the roasted tomatoes, a handful of fresh basil leaves and chilli flakes, if using. Add ricotta cheese and about 60ml (¼ cup) of the reserved pasta cooking water and blend until smooth.
In a large skillet or pan, combine the blended tomato mixture with cooked pasta and toss until the pasta is evenly coated with the sauce. Heat over medium heat until heated through. Add more pasta cooking water if the sauce appears too dry.
Taste and adjust the seasoning, adding more salt or pepper if needed.
Serve the roasted tomato and garlic ricotta pasta in bowls, garnished with fresh basil leaves and parmesan cheese. Enjoy!