it really depends on what sort of damage you,ve done to your shoulder, but by and large its that famous of cures ''rest'' what you require.
Obviously if your in that much pain, you should get it checked out at your GP's or the hospital, or even get some physiotherapy, so theres really no time scale, it could be a day or two, or even the best part of a week i guess.