To make the spiced pear syrup, put the ingredients in a pan with 250ml water and simmer for 20-30 minutes until the flavours have infused. Leave to cool.
To make the cocktail, put all of the ingredients into a cocktail shaker without ice and shake vigorously. Open the shaker, fill with ice and shake again, then strain into a chilled coupe. Place a star anise on the foam to serve.