Gather all your ingredients. Finely chop the shallot and garlic, and roughly chop the kalamata olives.
In a large pot, bring salted water to a boil and cook the spaghetti according to package instructions until al dente. Reserve about 1 cup of pasta water before draining the spaghetti in a colander.
While the pasta is cooking, heat the extra-virgin olive oil in a large skillet over medium heat. Add the chopped shallot and sauté for about 2-3 minutes until it becomes translucent.
Stir in the chopped garlic and red pepper flakes, cooking for another minute until fragrant. Be careful not to let the garlic burn.
Add the drained San Marzano tomatoes to the skillet, breaking them up with a spoon. Season with sea salt and stir to combine. Let the sauce simmer for about 10 minutes.
Mix in the capers and kalamata olives, cooking for an additional 5 minutes. Taste and adjust the seasoning if necessary.
Once the spaghetti is cooked and drained, add it directly to the sauce in the skillet. Toss everything together, adding reserved pasta water a little at a time until you achieve your desired sauce consistency.
Remove the skillet from heat and stir in the chopped fresh parsley. Serve immediately, garnished with more parsley if desired.