At the moment (this may change in the future) your faction with various mobs is part of the state that is saved when you shroud - your shrouded form will have the same faction as your normal form. (If the coldain like you normally, they'll like your shroud.) When you unshroud, your faction is restored to exactly the state it was when you first shrouded. Only new items (via shroud bank) and new xp (direct conversion) are carried between the forms. This means that if you stomp some coldain while shrouded to the point that they are KOS while shrouded, but were non-KOS when you started, you'll be non-KOS when you unshroud.
This means two big things - you can't use a shroud to effectively farm faction (I.E. using a wizard shroud to mass kill, if they were worth anything), and you can use a shroud to "skip" bad faction for getting certain drops. Bad freeport faction for the pally epic comes to mind.
A secondary trick to this is that your buffs and pet are part of the state information that is saved when you shroud, so if you shroud just before going afk or logging for the evening, when you come back and unshroud, your buffs and your pet will come back just as they were.