Dogs, much like humans, have a vast array of emotions. While many people think dogs are just happy-go-lucky, they can be so much more complex than that. Dogs can be traumatized, neglected, or just not socialized well, leading them to fear and be tentative with humans. If you are trying to establish a relationship with a dog who has had some negative experiences, it requires time, patience, understanding, and a gentle touch.
Whether you happen to be adopting a dog from the shelter or simply making friends with someone else's dog, you must realize that a fearful dog may take a longer time to trust you. Therefore, you first have to invest your time in learning their behavior and body language before you decide to approach them.
Understanding a Fearful Dog's Body Language
Before trying to get a scared dog's trust, it is important to know what the signs of fear are in the dog. Dogs use their body language to communicate, and through movements, one can read emotions from them.

Common signs that a dog has fear include whimpering, cowering, back-stepping, or growling. Many a time, some dogs will put up an aggressive appearance, whereas this may result from one underlying factor: fear. The fear in dogs instigates a "fight or flight" effect, wherein it responds in defence upon feeling threatened.
Besides these obvious signs, there are some more discreet behaviors that tell a dog is scared. A dog may be seated in one spot but would move his head with your movement. Other indications are wide alert eyes, ears pinned back, or the "whale eye"-when a dog looks at you while turning his head away. These are the signs indicating the dog is uneasy or insecure around you.
How to Gain the Confidence of a Fearful Dog
Give Them Their Space
The first step in gaining confidence with a fearful dog is giving them space, as much space as possible. Your presence itself can raise their anxiety, so it is about respecting their space. A minimum distance of 10 feet is a good working distance, though this may change based on the dog's confinement-on or off leash, in or out of a crate.
Do not get to a dog in a close, enclosed place as this is where they'll feel trapped, thus more nervous and anxious about what is going to happen. Give them enough space to do their thing.
Safe Environment

If you’re bringing a rescue dog into your home, it’s vital to allow them to acclimate at their own pace. Set up a safe area, such as a crate with blankets, where the dog can retreat if needed. Once the dog arrives, give them space to explore their new environment without forcing interaction.
It may sound like you are ignoring the dog, but this is a very important way to help the animal feel secure. Let them come to you on their own time and do not force the animal to interact with you until they are ready.
Avoid Eye Contact
Eye contact is a major form of communication between dogs. In the wild, dogs often stare at each other prior to a fight; thus, to a fearful dog, direct eye contact can be viewed as a threat. Try not to stare directly at the dog, since this can increase their anxiety.
Instead, try looking to the side or a glance but don't lock eyes with the dog. This will be a very subtle adjustment, but it reduces the threat feeling and let him get more comfortable with you.
Control Your Own Behavior
To dogs, humans are much larger and often scarier creatures. Make yourself as small as possible to reduce this impact. Crouch down to the dog's level, but also approach from the side rather than head-on to make them feel more in control. Never direct eye contact at them, but let them come to you at their own pace.

Let the Dog Approach You
Do not force an encounter; let him come to you when he may be ready. Sit calmly and down at a level with them, then just wait. A curious dog will approach you very slowly. There should not be any jerky movements, as this will startling the dog, which may break the process of gaining trust from them.
Extend your hand, palm down, towards the dog slowly and let him sniff it. If he looks interested, lightly start petting, beginning with the chest area. The chest is less threatening than the head and will allow the dog to be more comfortable. Pay attention to his body language, and if he pulls away or acts as if he does not want to continue, then give him space.
Use Positive Reinforcement
Positive reinforcement is one of the best ways to instill confidence. Any time the dog is making an effort either to engage with you or to overcome their fear, give them a treat. Dogs will learn to correlate positive experiences with your presence.
It is absolutely important to avoid negative reinforcement-such as punishments or harsh treatments-since this can exacerbate the dog's fear. As an alternative, rewards should be given to positively reinforce good behavior and gradually establish a basis of trust and affection.
Conclusion
Building up trust with a fearful dog requires great patience and time, besides being very consistent. Be it adopting a rescue or attempting to make friends with one who's afraid, cognizance of their feelings and respect for personal space will be imperative. By giving them space, managing your behavior, avoiding direct eye contact, and rewarding them, that fearful dog can become a sweet and faithful companion.
In time, a fearful dog will learn to view you as a safe and comfortable figure, and you will be rewarded with the eventual bond that develops between you.