They are going into a pan with the syrup and cooked till most of the syrup is absorbed or evaporated. Then these are dried and ground.
Not really sure on the process commercially. I do buy them already prepared. If you decide to purchase some be careful you don't buy the beans that are made of chocolate.
pan |