Look at the top five cards of target player's library. You may then have that player shuffle that library.
If there are less than 5 cards in the library, you look at whatever ones remain and you still get the option to shuffle.
This is not a draw and will not cause a player to lose if there are less than 5 cards in the library.
You can’t rearrange the cards. You put them back in the same order or have the whole library shuffled.