Preheat oven to 180 C. Peel and finely slice onions and garlic. Place in shallow frying pan, add the olive oil, a teaspoon each of salt & pepper and 100ml water.
Cover the pan with a lid and cook gently for about 30 minutes – without colouring – until the onions are completely soft. Remove lid, increase heat and stir onions frequently until a dark colour and the liquid has nearly gone.
Add green olive paste.
Roll out pastry to fit a flat baking sheet, remembering to shape a small edge around the perimeter.
With puff pastry, prick well all over so that it bakes flat.
Spread caramelised onions evenly all over and decorate with the anchovies in a lattice pattern.
Fill the resulting diamond shaped spaces with olive halves. Bake for 10 minutes, or until the base is crisp and the top dark gold.
Remove from oven, squeeze lemon juice over and serve warm at room temperature.