Line a 9 x 9 inch pan with parchment paper and set aside. You can even use a bigger pan (like 10 x 13 inch) to make thinner burfis.
Melt ghee in a pan on medium heat. Add the sifted besan into the pan and stir. Lower the heat to "low".
Start stirring, the besan will clump up at first. Don't worry and keep stirring. After around 15 minutes, the besan will start to loosen up (see pictures above).
After stirring for around 20 minutes, it will become smooth. Around 25 minutes, it will become like a smooth paste. Add cardamom powder at this point and cook for 5 more minutes.
So, I cooked the besan for total of 30 minutes on low heat. Remove pan from heat and set aside. Let it cool down slightly while you make the sugar syrup.
To a pan, add sugar and water on medium heat. Let the sugar dissolve, will take around 4 to 5 minutes.
Then lower the heat and let syrup simmer for 5 to 6 minutes until it reaches one string consistency. It takes me 6 minutes always after the sugar dissolves to reach the 1 string consistency on low heat.
Put a drop of sugar syrup between your thumb and index finger and pull them apart, you should see a single thread formation. This is the right consistency. Turn off the heat as soon as the syrup reaches that stage. Do not over cook the sugar syrup.
Now add the sugar syrup to the cooked besan (PS: heat is off at this point).
Stir until all the sugar syrup is well combined with the besan. Do not do this for a long time, act quickly here.
Transfer the mixture to a 9 x 9 inch pan lined with parchment paper. Tap the pan to get rid of excess air. Sprinkle pistachios on top.
Let the burfi set for 1 hour and then cut into pieces. I trim the edges and then cut them into squares.
Store besan burfi at room temperature for 10 days!