Don't smack the dog. Understand the dog is probably teething - just like kids. It's gums hurt. Give it appropriate toys & things it can chew, bite & praise (in a higher pitch voice) when the dog uses the appropriate toy. (Give it an enthusistic "GOOD DOG!!!!")
I've never had a dog with a bad biting thing, but my friends doberman puppy did & he hurt! When he grabbed my arm, I grabbed his jaw, kept my hand wrapped around his lower jaw (fingers between the teeth), looked him in the eye, and reprimanded him with a firm, low pitch "NO!" A couple repeats & he stopped biting. Negative reinforcement & establishing who is the 'top dog'. After a week living me me - no more biting.
You could also try bitter apple - a substance that dogs are not supposed to like (although my lab licks the stuff.) Put some spray or spread on your hand then offer it to your dog. The smell & taste should deter biting (also works for chewing problems)
Good luck & be consistent - always reinforce the same behaviors. I've found most dogs really want to be good. We just need to learn to communicate. And thank you for adopting from a shelter. My current lab was a shelter dog & she is my best dog ever! 2-3 yrs old when I got her (6 yrs old now), never jumped on furniture/people, no chewing, no biting, great with kids, just wants to make her people happy.