Cook pasta according to packet instructions and then drain.
Pour olive oil in a large deep frying pan over high heat. Stir-fry onions and garlic until lightly browned. Reduce heat to medium high; add tomatoes, vinegar and chicken stock and simmer for about 8 minutes.
Stir in chilli flakes, black pepper, basil and cooked pasta, tossing thoroughly with sauce. Simmer for about 5 minutes and serve topped with parmesan.