While the card is in your hand, if it would be shuffled into your library, it's instead shuffled into its owner's library.
If you cast the card put into your hand this way, you'll control the permanent it becomes. However, Five-Finger Discount doesn't change who its owner is. If it dies, it's put into its owner's graveyard. If it's returned to its owner's hand, it will go to the hand of its actual owner, and so on.