Preheat the Oven: Preheat a fan oven to 400°F (200°C).
Sauté the Mushrooms: Melt 1½ tablespoons (20 g) of butter in a frying pan over high heat, then sauté the sliced mushrooms for a few minutes until they are slightly softened.
Cook the Peppers: Add the sliced Turkish green chilies or bell pepper and sauté for a couple more minutes.
Add the Garlic: Stir in the minced garlic and cook briefly with the vegetables.
Build the Tomato Sauce: Add the chopped tomatoes, optional chopped red chili or chili flakes, freshly ground black pepper, and salt. Stir everything together and gently cook over low heat for 6–7 minutes. Add the Shrimp: Remove the pan from the heat, add the peeled and deveined shrimp, and stir gently until they are combined with the tomato mixture.
Transfer to the Baking Dish: Spoon the shrimp mixture into an oven dish, Güveç dish, or four individual ramekins.
Add the Cheese Topping: Sprinkle the grated kasar or cheddar cheese evenly over the shrimp mixture, then scatter the dried thyme over the top.
Finish with Butter: Cut the remaining 2 tablespoons (30 g) of butter into small cubes and distribute them over the cheese.
Bake the Shrimp: Place the dish in the preheated oven and bake for 10–12 minutes, or until the cheese has melted and the shrimp are cooked through.
Check for Doneness: Avoid overcooking the shrimp, as they can become rubbery and lose their flavor.If using smaller shrimp, reduce the oven cooking time by a few minutes.