Heat the oil in a saucepan, add the onion, chillies and garlic and cook until soft. Add the capers, tomatoes, olives and anchovies, cover tightly and simmer for 10 minutes. Season to taste with salt and pepper.
Meanwhile, cook the pasta in a large saucepan of salted boiling water according to the packet instructions until al dente.
Drain the pasta. Serve immediately topped with the sauce and the Parmesan.