Combine water and sugar in a saucepan. Bring syrup to a boil.
Melt butter in a separate saucepan over medium-low heat, about 5 minutes. Add semolina and pine nuts. Cook, stirring continuously, until golden brown, 20 to 30 minutes.
Pour syrup carefully over the semolina mixture. Reduce heat to low. Cover and simmer until nicely thickened, about 5 minutes. Let rest for 15 minutes. Divide halva over several small dishes.