Preheat oven 350˚F. Grease muffin tin with ghee.
In a large bowl, add the knafeh. Pour the ghee over the knafeh and message and pull apart the pastry to ensure the oil has coated all the strains of pastry.
In a medium bowl, add the ricotta and sugar. Mix well.
Add 2 tablespoon of the knafeh pastry to the cup tin, then press the pastry down to make a nest. Be careful not to make the base of the nest to thin. The knafeh should be about 11/2 inches thick.
Add 1 heaping tablespoon of the ricotta to the knafeh nest. Press the cheese mixture down, it should be sitting in the nest, and a little bit of the knafeh is surrounding the cheese.
Cover the cupcake with more knafeh, and press down. The cupcakes should be at the same level as the tin.
Bake for 10 minutes or until the edges are golden brown.
In the meantime, prepare your simple syrup. In a small saucepan, add the sugar, water and lemon. Bring to a boil and reduce heat to a simmer. Continue until the temperature reaches to 200˚F on a candy thermometer.
Once the knafeh cupcakes are finished baking, pour ¼ of a cup of simple syrup on each cupcake. Most ladles measure ¼ of a cup: so you can use a ladle. The cupcakes should be swimming in the syrup.
Let cool for 15 minutes, remove the cupcakes from the tin and garnish with pistachio.