Heat the olive oil in a saucepan and cook the garlic for 1 minute, then add the tomatoes, capers, anchovies, olives and chilli flakes. Simmer for 10 minutes, until the sauce starts to thicken. Stir in the chopped parsley.
Meanwhile, cook the spaghetti in a saucepan of boiling water according to the packet instructions, until ‘al dente’. Drain the pasta, toss in the sauce and serve.