Fruit + spices + vinegar + time + sugar
Wash the pears, core them, chop them, and put in a large jar (I recommend a 2-quart jar or splitting them between two 1-quart jars.
Add the spices, then cover the mixture with apple cider vinegar, white wine vinegar, or a mixture of the two. Fill the jar to the top leaving very little headspace. You want the fruit to stay submerged in the vinegar.
Put the top on, shake it gently, and set aside for 2-3 days. Shake the jar a couple of times a day if you like.
After 2-3 days, the mixture should be ready. Place a sieve over a large bowl and strain it. Don’t press the fruit the way you usually do; the pears (if ripe) are too soft for this and will drip large amounts of sediment into your shrub. Don’t even shake the sieve. (I did and managed to get a lot of sediment in the bowl, so I had to strain three times instead of twice!)
Measure or eyeball the vinegar mixture and to it, add about half as much sugar. Stir to dissolve.
Strain through a cocktail sieve into a jar or bottle; cover tightly and refrigerate until ready to use. You can try it now, but the flavors will meld, marry, and get happy over the next weeks.