Wash and cut the eggplants into small pieces. Add a good amount of olive oil into a pot. When the oil is hot, add the eggplants in small doses. Deep fry them for 4/5 minutes until golden. Drain the fried eggplants and place them over a plate covered with baking paper to assorbe the oil in excess.
Cut the onion, tomatoes, celery and olives.
Add the pea nuts in a pan and let them roast for a couple of minutes.
Add oil into a pot and when hot, add the onions. When golden, add the celery, olives, capers, roasted pea nuts, tomatoes and salt. Stir between each step.
Cover and let it cook over low heat for 15/20 minutes.
Meanwhile, add white vinegar, tomato paste and sugar in a glass. Mix well with a spoon.
After 15/20 minutes of cooking time, add the vinegar sauce into the pan. Increase the heat and rinse for 5 minutes. Remove from the heat and add the fried eggplants and a good dose of basil.
Mix well all ingredients and let the dish cool down.
Caponata is a dish to be served at room temperature, so store it in the fridge for some hours (ideally overnight as the dish will taste better the next day!).