Cut off the ends of the aubergines. Wash the aubergines and cut into pieces. Put the aubergine pieces in a large sieve, sprinkle with salt and leave to stand for about 1 hour. In the meantime soak the raisins in warm water.
Peel and halve the onion and cut into thin slices. Clean, wash and chop the celery and tomatoes. Wash, seed and finely chop the pepperoni. Wash basil, dab dry, pluck leaves from the stalks and cut into strips.
Rinse aubergines with cold water and dab dry with kitchen paper. Heat olive oil in a flat, wide casserole dish. Fry the aubergines at medium heat for about 5 minutes, turning them over, and remove them from the pot.
Put the celery in the same oil and fry for about 2 minutes, also while turning. Remove from the pot and add to the aubergines. Add the onions to the oil and fry them for about 2 minutes, turning them over. Add the tomatoes, olives, capers, pine nuts and half of the basil and cook over medium heat for about 10 minutes.
Add aubergines, celery, pepperoni, vinegar, sugar and stock, stir and let it boil down for about 6 minutes. Season to taste with salt, paprika and pepper. Sprinkle with remaining basil and serve garnished with basil leaves as desired.