An important aspect of salamba sarvangasana (shoulder stand) is learning to control where your center of gravity is with respect to your base.
The better you are at feeling where your center is and the better you are at controlling it, the easier it is to get comfortable in this pose because you aren't worried about bending your neck too far forwards.
Once you can balance on your shoulders and once you can keep your shoulder blades together you can then work at gradually making your torso and legs vertical in shoulder stand.
If you are not used to going upside down then a way to get used to going upside down in shoulder stand is to use a wall.
Ideally your torso and legs are vertical but what is more important is drawing your shoulder blades together so that your spine (particularly the vertebrae of your upper thoracic spine and lower cervical spine) are lifted off of the floor.
One concern in shoulder stand is that it can be painful, uncomfortable or undoable if the back of your neck is tight. One solution is to stretch the back of your neck before you do shoulder stand.
You can do this while sitting upright (legs crossed or while kneeling.) You can experiment with keeping the chest lifted (as shown below) or letting it sink down so that the upper thoracic spine is bent forwards.
Another possibility is to use Sasangasana or rabbit pose.
While kneeling, place the top of your head on the floor. Press your hands into the floor beside your head and use them to lift your ribcage and take some of the weight off of your neck.
Vary the position of your hands and find the position that best allows you to 'take" the weight of your neck.
In addition feel free to vary the distance between your head and knees so that you find the position that allows you to stretch your neck without damaging it.
From here, slowly roll your head forwards so that the back of your head gets closer to, if not on the floor.
You can slowly roll forwards, taking the time to feel your neck as you do so, or you can slowly roll back and forwards, gently stretching and then releasing, each time going a little deeper. Take about 5 seconds or more to roll forwards and then the same or longer to return.
As you get more comfortable you can try lifting your knees off of the floor so that you lift your pelvis. Make sure that you are still using your arms to bear the weight of your upper body.
The nice thing about sasangasana is that you can use your body weight to help stretch your neck in a controlled fashion and as such it is similar to shoulder stand.
An alternative to Sasangasana is to bend your neck forwards while you are upright. You can clasp your hands behind your head and use the weight of your arms or their strength to pull your head forwards. This stretch is gentler and so could be used prior to rabbit pose.
Yet another alternative which avoids the neck issue altogether is to do salamba sarvangasana with your shoulders propped up on blankets while you head rests on the floor. In this case your shoulders are then higher than your head and so there is less bend to your neck and thus less stress.
If you have neck injuries I would strongly suggest that you go to see someone who understands the body, and the neck and how to work with it without further damaging your body.
Do this prior to trying salamba sarvangasana.
Note that as the back of your neck gets more flexible, you may find that you need to stretch it less and less before doing salamba sarvangasana.
You may actually find that you can use shoulderstand to help stretch your neck.
However, if you stretch your neck infrequently, or if you go for a long break without doing either neck stretches or shoulderstand, I would suggest moving into shoulderstand slowly, and if you find your neck is stiff, come out and stretch your neck before going back into shoulderstand.
Actually, you can enter any pose, and leave it, slowly and smoothly.
By so doing, the movement in and out of a yoga posture becomes just as much a part of the posture as doing the pose itself.
One of the challenges that some people have when doing salamba sarvangasana is actually getting legs and pelvis off of the floor.
If you have this problem then one way of learning to get your hips up is to practice rolling on your back.
This is actually one of the balance exercises included in the balance basics ebook.
While sitting make sure that the floor behind you is clear of any objects or obstacles (chairs, tables, people, pets, children, small sharp objects, vacuum cleaners, water bottles, saws, hammers etc.)
As you get used to these two actions,
Next try rolling without holding on to your knees. Instead, place your hands on the floor beside where your hips where.
Next develop your control by trying to roll forwards and backwards slowly, for a count of 10 each way. Try to keep your center of gravity just in front of your foundation as your roll forwards and just behind your foundation as you roll back.
Moving into Salamba Sarvangasana
Once you are comfortable with rolling and getting your hips up and back, you can experiment with getting into salamba sarvangasana via plow pose (Halasana).
If you can't grab your hands, grab the sides of the matt.
Pull outwards on the mat with your hands to work your shoulder blades together.
If you have trouble holding your hips up, bend your elbows immediately after lifting your hips and place your hands on your lower back to help stop you from rolling out.
You can then try working your shoulder blades together while keeping your hands against your lower back.
In plow pose you may find that you can press your feet into the floor (or a chair) and this helps take some of the weight off of your head or neck.
When taking your feet off of the floor to move into shoulder stand, your neck is going to have to support the weight of your legs unless you can get your weight forwards, onto your shoulders.
So prior to lifting your feet you may find it a lot more comfortable on your neck if you actively press your head into the floor so that your neck muscles engage.
Keep your neck muscles engaged as you lift your feet.
If you can get your weight forwards so that it is over your shoulders or between your shoulders and your elbows, then you may find that you can relax your neck.
I'd suggest relaxing your neck slowly. (Try activating it slowly also.)
If you are worried about your neck then keep your weight slightly forwards, between your shoulders and your elbows.
This will mean more work for your arms.
While holding salamba sarvangasana,
If you can't get your torso and legs in one vertical line, not to worry, work towards it slowly.
If you can't get your ribcage vertical it is more than likely your neck that limits you. While in salamba sarvangasana,
If this causes pain, especially neck pain, then don't do it. Instead hang out with your ribcage and legs at opposite angles to each other.
Because salamba sarvangasana bends your neck forwards, a logical counter pose once you've rested after coming out of the pose is to bend your neck backwards. You might also enjoy bending your thoracic spine backwards.
Shalabasana, or locust pose is one way to do this.
You can also try sidebending and twisting your neck.
When side bending and twisting your neck focus on feeling the vertebrae of your neck. Feel them moving relative to each other whether bending your cervical spine or twisting it.
For more on inverted yoga poses and getting comfortable while upside down check out inverted yoga poses.
For more on balance check out yoga balance poses.
For an even more thorough breakdown of balance check out balance basics.
8 book Ebook bundle, $48.00.
Dance of shiva for coordination and mental flexibility, balance basics for understanding balance, yoga basics 1 and 2 for getting a feel for your body, hip control guide and yoga for your shoulders for learning your hips and shoulders, wheel pose for tips on learning difficult poses and know to flow to learn how you can use flow and it's opposite state for enjoyable learning.