Peel, halve and core the courgettes. Cut them into pieces 2-3 cm thick. Bring the vinegar, water, sugar and salt to the boil. Add the courgettes and boil for 2 minutes. Remove the courgettes with a slotted spoon and put them in warm, sterilized jars.
Add the spices and lemon zest to the pickling liquid and simmer uncovered for 15 minutes. Allow to cool. Pour the hot liquid over the courgettes and seal the jars. Store in a cool place.
The courgettes can be replaced with pumpkin.