Shuffle is a keyword action that was introduced in Alpha. A shuffled deck must be completely randomized. Libraries can only be shuffled when a player is directed to do so by the rules.
Before each game, each player must shuffle his or her deck. While the Comprehensive Rules state only that libraries must be in a state such that no player knows their order, the Tournament Rules go into substantially more detail. Notably, the Tournament Rules state that pile shuffling alone is not adequate. Additionally, players must have the option of performing a final shuffle of their opponent's deck. At the Competitive and Professional Rules Enforcement Levels, players must shuffle their opponents decks.
During the game, various effects may require a player to shuffle their library again. This usually follows a player searching that library, and is necessary to avoid that player accurately predicting every draw from that library. Outside of search effects, several cards direct that some set of cards be shuffled into the library from other zones.
R&D tries to minimize the frequency of shuffle effects by avoiding printing them at lower rarities, because they slow down the pace of play, and because many new players are uncomfortable with shuffling.
From the Comprehensive Rules (Rivals of Ixalan (January 19, 2018))
- 701.18. Shuffle
- 701.18a To shuffle a library or a face-down pile of cards, randomize the cards within it so that no player knows their order.
- 701.18b Some effects cause a player to search a library for a card or cards, shuffle that library, then put the found card or cards in a certain position in that library. Even though the found card or cards never leave that library, they aren’t included in the shuffle. Rather, all the cards in that library except those are shuffled. Abilities that trigger when a library is shuffled will still trigger. See also rule 401, “Library.”
- 701.18c If an effect would cause a player to shuffle one or more specific objects into a library, that library is shuffled even if none of those objects are in the zone they’re expected to be in or an effect causes all of those objects to be moved to another zone or remain in their current zone.
Example: Guile says, in part, “When Guile is put into a graveyard from anywhere, shuffle it into its owner’s library.” It’s put into a graveyard and its ability triggers, then a player exiles it from that graveyard in response. When the ability resolves, the library is shuffled.
Example: Black Sun’s Zenith says, in part, “Shuffle Black Sun’s Zenith into its owner’s library.” Black Sun’s Zenith is in a graveyard, has gained flashback (due to Recoup, perhaps), and is cast from that graveyard. Black Sun’s Zenith will be exiled, and its owner’s library will be shuffled.
- 701.18d If an effect would cause a player to shuffle a set of objects into a library, that library is shuffled even if there are no objects in that set.
Example: Loaming Shaman says “When Loaming Shaman enters the battlefield, target player shuffles any number of target cards from his or her graveyard into his or her library.” It enters the battlefield, its ability triggers, and no cards are targeted. When the ability resolves, the targeted player will still have to shuffle his or her library.
- 701.18e If an effect causes a player to shuffle a library containing zero or one cards, abilities that trigger when a library is shuffled will still trigger.
- 701.18f If two or more effects cause a library to be shuffled multiple times simultaneously, abilities that trigger when that library is shuffled will trigger that many times.
From the glossary of the Comprehensive Rules (Rivals of Ixalan (January 19, 2018))
- To randomize the cards in a deck (before a game) or library (during a game). See rule 103.1.