First off that's just a band aid no matter what. Second it depends on the chemical make up of the pellets. Sodium Chloride (Salt) is damaging to the roof as wella s gutters and metal flashings and may void any warranty you have on the roof. While Calcium Chloride is slightly more gentle, you may still want to check with the manufacturer of your roofing products before throwing them up on your roof.
DO they work? Sure, they melt the snow on the ground, why not on the roof. However again it's a band aid approach. The permanent solution is improved insulation, ventilation, and if the ice is working it's way inside the building then also an ice shield beneath the roofing material.
Sometimes the savings that comes from doing it yourself can be blown away with one mistake.
The information found in this post is not to be considered legal advice. All information should be considered relative, not specific. Never attempt any repairs you are not comfortable with. Always maintain safety! The author of this post takes no responsibility for any losses that occur. Use at your own risk.