I seem to recall that Shadowfax was taken with Gandalf to Valinor, but I have not been able to find a clear reference in the Lord of the Rings. Is there any writing by Tolkien adressing this question?
Tolkien wrote on this subject in a letter to a fan. It was his belief that Shadowfax did indeed travel with Gandalf, despite it not being mentioned specifically.
I think Shadowfax certainly went with Gandalf [across the Sea], though this is not stated. I feel it is better not to state everything (and indeed it is more realistic, since in chronicles and accounts of ‘real’ history, many facts that some enquirer would like to know are omitted, and the truth has to be discovered or guessed from such evidence as there is). I should argue so: Shadowfax came of a special race (II 126, 129, III 346) being as it were an Elvish equivalent of ordinary horses: his ‘blood’ came from ‘West over Sea’. It would not be unfitting for him to ‘go West’. Gandalf was not ‘dying’, or going by a special grace to the Western Land, before passing on ‘beyond the circles of the world’: he was going home, being plainly one of the ‘immortals’, an angelic emissary of the angelic governors (Valar) of the Earth. He would take or could take what he loved. Gandalf was last seen riding Shadowfax (III 276). He must have ridden to the Havens, and it is inconceivable that he would [have] ridden any beast but Shadowfax; so Shadowfax must have been there. A chronicler winding up a long tale, and for the moment moved principally by the sorrow of those left behind (himself among them!) might omit mention of the horse; but had the great horse also shared in the grief of sundering, he could hardly have been forgotten.