He restoreth my soul: he leadeth me in the paths of righteousness for his name's sake.
Now the psalm transitions away from the metaphor of shepherd into an explanation of the spiritual meaning of "shepherd."
God cares for the speaker's soul as well as his ability to know right from wrong and pick the right path.
The translation of "restores" (oh sorry, "restoreth") is tricky. Is he saying that his soul was lost before God restored it? We would guess that "restore" means something more like, "bring back to full vitality." Or, put more simply, "refresh."
What does it mean that God leads the speaker to righteousness for his name's sake?
What the phrase "for his name's sake" most likely means is the old idea that good actions are performed for the sake of goodness only. And God is ultimate goodness.
The opposite of "for his name's sake" would be "for my sake."
Some Christian commentators interpret this line in light of the idea of unearned and undeserved grace.