Put the tomatoes in a roasting tin with the oil, thyme, garlic and chillies, and season with salt and pepper. Roast in a preheated oven, 200°C (400°F), Gas Mark 6, for 15–20 minutes until the tomatoes have softened and released their juices.
Meanwhile, cook the pasta in a large saucepan of salted boiling water according to the packet instructions until al dente. Drain and return to the pan.
Stir the tomatoes with all their pan juices and most of the basil leaves into the pasta and toss gently until combined. Season with salt and pepper and spoon into serving bowls.
Chop the remaining basil, mix into the ricotta and season with salt and pepper. Spoon into a small dish for guests to spoon on to the pasta.