shekhar ! I dont know what exercises u do but u must be doing shoulder presses (which everyone doesusing dumbells and rods) , always do it in front.
lot of people do it at the back of their head i.e bringing the weights down behind ur head , which is an incorrect motion for your shoulders and u can easily injure it when u try to push heavy weights
with pull down exercises (for back) ,like shoulder press always do it in the front (never at the back) thats one of the exercises which give shoulder injuries.
u dont need to apply ice packs anymore (i think u mentioned u use ice packs and heat treatment). Ice pack is only for fresh injuries. Stick with heat treatment and natural movements to exercise.
Give it a good rest till it gets normal , avoid heavy weights till u heal up, do natural movements and stretches and do ur weights slow whenever u start doing them.
I have gone through it any it takes long long time to heal up and prevents u from working out on other parts as well.
So, the key is :do ur weights slow, be balanced, and avoid any movements which is not smooth.