01 -
In a small saucepan, add the olive oil. Smash and peel the garlic cloves, then add them to the oil along with the red pepper flakes and basil. Place over medium-low heat until it begins to simmer. Let it infuse for 1-2 minutes, then remove from heat.
02 -
Cook the spaghetti according to package instructions until al dente. Reserve ½ cup of pasta water before draining.
03 -
Slice the onion in half through the root and peel off the skin. In a large pot, heat butter and a splash of oil over medium-low heat. Place the onion cut-side down and cook for 8 minutes, until golden brown and fragrant.
04 -
Add the canned tomatoes to the pot, using a wooden spoon to break them up. Bring the sauce to a gentle boil, season with salt, cover, and let simmer for 8 minutes on low heat.
05 -
Stir the infused basil oil into the tomato sauce, adjusting salt as needed. Pour in the reserved pasta water and let the sauce simmer uncovered for 5 minutes. Remove the onion halves and blend the sauce with an immersion blender until smooth.
06 -
Toss the cooked spaghetti in the sauce until evenly coated. Serve immediately with grated Parmesan and fresh basil, if desired.