Bring a large pot of heavily salted water to a boil.
Combine the olive oil and garlic in a deep saucepan and cook over medium-low heat. Cook for about 3 minutes or until the garlic is very fragrant but not browned. Add the anchovies and red pepper flakes. Use a wooden spoon to smash and break down the anchovies until they dissolve into the oil. Add the olives and capers and cook for another minute.
Add the tomatoes and juices. Stir well and simmer for 10 – 15 minutes until the sauce reduces and thickens.
When the salted water comes to a boil, add the spaghetti. Cook 1 - 2 minutes less than the package directions. Reserve 1 cup of the starchy cooking water and drain the spaghetti. Add the spaghetti to the sauce along with ¼ cup of pasta water to start. Stir to coat the spaghetti and finish cooking in the sauce, about 2 minutes. Add more pasta water as needed.