Pare the zest from the lemon or orange and put in a pan with the cloves, peppercorns, allspice berries, root ginger, lemon or orange juice, vinegar, cinnamon sticks and sugar. Stir over a gentle heat until the sugar has dissolved.
Peel, core and halve the pears, then add to the pan and simmer for 15 mins, until the pears are tender. Remove the pears with a slotted spoon and put in a colander to drain. Meanwhile, increase the heat under the syrup and boil rapidly for 15 mins, until the syrup has reduced by about a third and slightly thickened.
Pack the fruit into warmed jars and pour over the hot syrup to cover. Seal, label and store in a cool dry place for a month before using.