Extract 2 cups coconut milk from fresh grated coconut.
In a pan, add coconut milk and 1 cup condensed milk. Mix well.
Prepare a smooth slurry using corn flour + little coconut milk.
Add the slurry to the mixture and mix well without lumps.
Add pineapple essence (optional) and mix.
Cook on medium flame, stirring continuously with a whisk.
After 5–10 minutes, the mixture thickens to a creamy consistency.
Switch off the flame and pour into a tray or bowls.
Cool to room temperature, then refrigerate for 3 hours.
Serve chilled or cut into pieces like halwa.