Cook the pasta in a pan of boiling water, following the instructions on the packet.
Meanwhile, cut the onion and garlic into thin slices.
Heat some oil in a frying pan and sauté the onion for 5 minutes, then add the garlic and capers and cook for another minute.
Add the tomatoes (without the vine), chilli flakes and herbs. Add the balsamic vinegar and a splash of water. Season with salt and pepper.
Put a lid on and cook for about 10 minutes over low heat, until you get a thick sauce. You might need to add more water.
Add the spinach and a squeeze of lemon juice. You can add a small ladleful of the pasta’s cooking water too. Put the lid back on and let the spinach wilt.
By now the pasta should be ready, so drain and keep it warm.
When the spinach has wilted, stir through the pasta, then serve.