Tie his lead to your waist, as he will be always by your side. Treat him when he is good with a nice bit of sausage, when he tries to cross or step on the beds spray him in the face with water from a 'sucky' water bottle telling him "NO" each time.
It will take a lot of perseverance from you, but once he has been 'watered' enough times he will get the idea. Shepherds are quick to learn.......mostly :D.
Good luck ;)