Heat the oil in a large, deep flameproof casserole, add the pasta and toss around the pan for a couple of minutes until golden. Add the thyme, tomato purée and vinegar and stir in to coat the pasta.
Add a ladleful of stock and the sugar to the pan. Keeping the sauce at a gentle simmer, add the stock, one ladleful at a time, stirring occasionally.
After 10 minutes cooking, add the tomatoes. Cook for a further 5–10 minutes until the liquid has been absorbed or the pasta is tender. Season well and serve scattered with the basil and Parmesan shavings.