Use "shut himself away" in a sentence

1. He shut himself away to pray in solitude.

2. From there he moved on to Edinburgh, and finally shut himself away in his much embellished palace of Falkland to die.