the 私のために part is kind of like "for my sake," it makes it seem like you're trying to get them to go to the shrine perhaps to pray on your behalf, is that what you mean?
Also, if you want to use に, it would be 谷にある神社 (a/the shrine in the valley). Otherwise, I would say 谷の神社 (the valley shrine).
The rest is fine, and ように is a good way to link that sort of structure together. I would maybe say 彼に谷の神社に行ってもらおうとします。