Cook the spaghetti in plenty of salted boiling water according to the packet instructions. Before draining, save a mugful of the pasta water.
While the pasta cooks, heat the olive oil in a large frying pan over medium-low heat. Add the sliced garlic and cook gently for 2-3 minutes until golden - do not let it brown or it will turn bitter.
Add the chilli flakes and cook for 30 seconds.
Add the drained spaghetti to the pan with a splash of the reserved pasta water. Toss everything together over the heat for 1-2 minutes until the pasta is coated in the garlic oil.
Remove from the heat, add the chopped parsley and toss again. Add more pasta water if it needs loosening.
Serve immediately with black pepper and parmesan if using.