Add oil, garlic, hot pepper flakes, and basil to a small saucepan. Heat over medium low. Once the ingredients start to sizzle, cook for 45 seconds - 2 minutes, until the basil is starting to wilt. Remove from the heat and set aside.
Melt the butter in a Dutch oven over medium heat. Add the onion, cut side down. Cook for 4-5 minutes, until it's just starting to brown. Add the San Marzano tomatoes, and mash with a potato masher until they are broken up into chunks. Bring to a simmer, reduce heat to medium low, and simmer for 20-25 minutes.
Meanwhile, make your spaghetti according to package directions, minus 2 minutes. You want to get the pasta out just before it's al dente so it can finish cooking in the tomatoes.
Pour your cooled oil in a food processor, and chop. Add the oil to the tomatoes, and simmer for another five minutes. Remove the onion. Taste for salt and pepper, and adjust accordingly.
Add the spagetti, cook for another two minutes until al dente. Remove to a serving platter, sprinkle with parmesan cheese and fresh basil leaves, and a drizzle of good olive oil.