Make the shrimp stock (You can do this two days ahead): Heat 2 Tbsp. oil in a large saucepan over medium-high. Add shrimp heads and shells and cook, stirring occasionally, until shells are bright red, 5–8 minutes. Stir in tomato paste and stir around in the pot for about a minute, until it starts to brown and stick a little to the bottom.
Add 1/3 cup wine and cook, scraping up brown bits, until almost completely evaporated, about 3 minutes. Add carrot, celery, thyme sprigs, peppercorns, 2 onion halves, all but 4 garlic cloves, star anise, and 8 cups water. Toss in a generous pinch of salt and bring to a boil over medium-high.
Reduce heat and simmer until stock is reduced by one-quarter and very fragrant, about an hour. Strain through a fine-mesh sieve and discard the solids. Keep warm over low heat.
Make the risotto: Heat remaining 2 Tbsp. oil in a large Dutch oven or other heavy pot over medium heat. Add chopped onion and garlic and cook, stirring often, until onion is translucent and softened, about 5 minutes.
Add rice and cook, stirring often, until grains are almost entirely translucent and starting to stick to bottom of pot, about 3 minutes. Stir in remaining 1/3 cup wine and cook, stirring, until wine is almost completely evaporated. Add ouzo and cook, stirring, until evaporated, about 45 seconds.
Ladle in about 1 cup warm stock and cook, stirring, until liquid is absorbed. Repeat process, adding more stock as each addition is absorbed, until rice is tender but not mushy, 25–30 minutes
Season risotto with salt and pepper and stir in shrimp. Cook, stirring, until shrimp are cooked through, about 3 minutes. Remove from heat and finely grate in lemon zest. Add butter and feta. Stir gently to incorporate.
Spoon risotto onto warmed plates sprinkle with chives. Garnish with lemon wedges and serve.