Rinse the olives and pit them if needed. Chop them roughly. Also roughly chop the capers and reserve both together in a small bowl. Roughly chop the anchovies and reserve separately.
Roughly chop the garlic. See our garlic Tip. Chop the parsley, see our herb Tip. Before starting to cook the sauce, get the spaghetti on to boil. Heat the water with a shake of salt until it is at a rolling boil - it should bubble and swirl. Add the spaghetti, gently pressing it down into the water and spreading it out until it is completely submerged. Stir to separate the strands. Cook for the time stated on the packet, usually about 10 to 12 minutes. Test a strand for doneness - if it is chalky or too firm, cook a little longer.
Add the olive oil to a large frying pan, and set over a medium heat. When the oil is hot, add the anchovies. Stir until they melt slightly into the oil, a few minutes. Add the garlic and stir until it softens slightly and the garlicy smell rises. Add a shake of chilli flakes, if using, to taste. Stir briefly to combine, then add the olives and capers and turn the heat up slightly. Fry until they sizzle and pop, a few minutes.
Add a generous squeeze of tomato puree to the sauce, stir, and add a jar of passata. Rinse the jar with a little boiling water and add this to the pan. Reduce the heat, and add about half the parsley. Stir, then simmer while the spaghetti is cooking. You want a sauce that is glossy and not watery, but still thin enough to coat the pasta. If the sauce gets too thick, add a few spoons of the hot pasta water.
Grate the cheese, if using, and set aside. Taste the sauce, and add seasoning if necessary to taste.
When the spaghetti is cooked, drain and add to the pan with the sauce. Stir well - a pasta server will make this easier - until the pasta is well coated, and the olives and capers well distributed.
Serve immediately, topping each portion with a little chopped parsley and some torn basil leaves. Top with the cheese, if using.
Enjoy!