Cook the spaghetti according to the package instructions in a large pot of salted boiling water until al dente. Drain and set aside.
In a large skillet or saucepan, heat the olive oil over medium-low heat.
Add the sliced garlic and red pepper flakes to the skillet. Cook them slowly in the oil, stirring occasionally, until the garlic turns golden brown. Be careful not to burn the garlic.
Remove the skillet from the heat and add the cooked spaghetti to the skillet, tossing it with the garlic oil and chili pepper until well coated. The residual heat will continue to cook the spaghetti.
Season with salt to taste and toss again to ensure the flavors are evenly distributed.
Optional: Garnish with freshly chopped parsley for added freshness and color.