Toss the aubergine in 2 tablespoons of the oil, place on a baking sheet and season. Place in a preheated oven, 190°C (375°F), Gas Mark 5, for 20 minutes until soft and browned.
Meanwhile, make the caponata sauce. Heat the remaining oil in a large frying pan, add the onion and garlic and cook gently for 5 minutes. Add the celery and cook for a further 5 minutes until very soft. Stir in the olives and capers, followed by the vinegar, sugar and tomatoes. Bring to the boil, then reduce the heat and simmer for 15 minutes, adding the baked aubergine to heat through for a couple of minutes. Season to taste.
While the aubergine and sauce are cooking, cook the pasta in a large saucepan of salted boiling water according to the pack instructions until al dente. Drain, reserving a little of the cooking water, and return to the pan. Toss through the sauce, adding a little cooking water to loosen if needed.
Spoon into serving bowls and serve sprinkled with the basil.