Preheat oven to 150C. Heat oil in a non-stick frying pan over high heat, add chicken in batches, skin-side down, and cook, turning once, until golden (4-6 minutes). Transfer to an ovenproof dish that it fits in snugly. Add shallots to pan, stir occasionally until golden (5-10 minutes), then add garlic and stir until fragrant (1-2 minutes). Add Sherry and Sherry vinegar then olives and bring to the simmer, pour over chicken, season to taste, cover and braise in oven until chicken is very tender (1-1½ hours).
For confit garlic, place garlic and oil in a saucepan over low heat and cook until garlic is tender and starting to caramelise (20-30 minutes). Transfer to paper towels with a slotted spoon.
Add rosemary to pan and stir until crisp (1 minute). Remove with a slotted spoon and drain on paper towels.
Increase oven to 180C, scatter pine nuts on a baking tray and toast until golden, stirring occasionally (4-8 minutes).
Serve chicken hot, scattered with confit garlic, pine nuts and rosemary.