Top and tail the courgettes, then cut into 1cm-thick coins.
Crush the garlic cloves with the side of the knife, so they split, but remain intact, and the skins come away.
Put the oil, garlic, courgettes and a pinch of salt in a frying pan set over a low-medium heat and fry the courgettes gently, turning them after a few minutes.
Gently fry on the other side for a few minutes, then add a few tablespoons of warm water to the pan, and leave to bubble away.
Add more water, and repeat until the courgettes are very tender and collapsing with just a little liquid left in the pan – this will take about 20 minutes.
While the courgettes are cooking, boil the pasta according to the packet instructions, until al dente, then drain.
Remove and discard the garlic, rip in the basil leaves and a few chilli flakes, if you wish, then add the drained pasta to the pan and mix (or mix the courgettes with the pasta in a large bowl).
Serve, passing round parmesan, pecorino or toasted breadcrumbs.
