Preheat the oven to 200ºC/180ºC fan.
Add a little olive oil to a small ovenproof dish. Place the chicken thighs in the pan skin-side down.
Place the pan on a medium-high heat and cook the chicken thighs for 8-10 minutes until the skin is golden and starts to crisp up. Once crisp, remove from the pan and place on a plate.
Add the onion and peppers to the pan and fry for 4-5 minutes until slightly soft. Add the garlic, capers and brine, olives, anchovies and chilli (if using) to the pan and fry for another 3-4 minutes until the anchovies have broken down. Season with salt and pepper.
Next, add the tomatoes and beans (including the water) and stir together. Nestle the chicken thighs back on top of the beans now (skin side up) and bake in the oven for 25-30 minutes. The chicken should be golden and crisp, and fully cooked, and the beans and tomatoes should have softened and reduced slightly.
Serve topped with the fresh basil leaves and a spoonful of sour cream.
