Cook the spaghetti in salted water until almost al dente, which is about 2 minutes less than the instructions on the package. The spaghetti will continue to cook in the sauce. Reserve a cup of pasta water before draining.
Meanwhile, heat the olive oil in a large frying pan over medium heat and add the garlic, red chilli flakes and fresh rosemary. Cook for 1-2 minutes until fragrant. Keep an eye on the heat, so the garlic doesn’t brown.
Pour the red wine and wait for it to bubble. Once the liquid simmers, transfer the cooked pasta to the pan and toss well until the spaghetti change their colour to dark red. Add a dash of pasta water if it looks like there’s not enough liquid in the pan.
Keep cooking the pasta, tossing often, until the liquid is almost completely absorbed. Stir in the Pecorino, season to taste, and serve immediately, garnished with chopped fresh parsley, if you like.
