Thinly slice the onion and finely chop the garlic.
Heat the olive oil in a pan and gently sauté the onion over low heat, stirring frequently, for about 10 minutes until soft. Add the garlic and cook for another 5 minutes or so.
Meanwhile, cook the spaghetti according to the packet instructions. Drain, reserving 3 Tbsp of the cooking water. Return the pasta to the pan and cover.
Using a spiraliser, shred the courgette into thin noodles.
Add the dried chillies and vinegar to the softened onions and let it bubble for a minute. Stir in the honey and caramelise the onions. Add the courgette noodles, turn off the heat and gently combine. Cover and rest for a couple of minutes to allow the courgette to steam a bit.
Add the onion and courgette mixture to the pasta, together with the reserved cooking water, then season to taste. Toss gently.
Serve with goat’s cheese crumbled on top, if liked.