In a small saucepan, combine 300 g caster sugar, 200 ml water and 1 tablespoon fresh lemon juice.
Bring to a boil over medium heat, stirring until the sugar dissolves.
Reduce heat and simmer for 8–10 minutes until the syrup is slightly thicker than water.
Remove from heat, stir in 1 teaspoon orange blossom water and set aside to cool completely.
Preheat the oven to 180 °C (160 °C Fan/Gas Mark 4) and lightly grease a 24–26 cm round baking dish.
If frozen, thaw 500 g fine kunafa pastry, then pull apart or chop into strands.
Pour 200 g melted unsalted butter over the pastry in a large bowl and use your hands to coat every strand.
Press half of the buttered pastry firmly into the base and up the sides of the prepared dish.
Evenly spread 400 g ricotta cheese over the pastry, leaving a 1 cm border.
Cover the cheese with the remaining pastry, pressing down lightly to form an even top layer.
Bake for 30–40 minutes until the top is golden brown and the edges are crisp.
Immediately pour the cooled orange blossom syrup over the hot kunafa and let it absorb for 5–10 minutes.
Garnish with 50 g roughly chopped shelled pistachios and serve warm.