Heat the extra virgin oil in a large frying pan over a medium heat. Add the onion and cook for 5–8 minutes, until softened. Add the garlic, chilli flakes and anchovies to the onion and cook for 2–3 minutes. Add the capers, olives and halved tomatoes and cook for 8 minutes, or until the tomatoes start to soften and break down slightly.
While the sauce is cooking, bring a large pan of salted water to the boil. Add the spaghetti and cook for 2 minutes less than the suggested time on the packet, stirring a few times. While the pasta is cooking, add a small ladleful of pasta water to the tomato sauce.
Drain the spaghetti as soon as it is ready, keeping back a little of the water, and add it to the sauce with the quartered tomatoes and another splash of pasta water.
Cook for 3–4 minutes, then stir in the parsley. Season with pepper, and salt if needed (the anchovies will be salty). Serve the pasta in warmed bowls, with Parmesan.