|This article needs additional citations for verification. (September 2009)|
A shim is a thin and often tapered or wedged piece of material, used to fill small gaps or spaces between objects. Shims are typically used in order to support, adjust for better fit, or provide a level surface. Shims may also be used as spacers to fill gaps between parts subject to wear.
Many materials make suitable shim stock, or base material, depending on the context: wood, stone, plastic, metal, or even paper (e.g., when used under a table leg to level the table surface). High quality shim stock can be bought commercially, for example as laminated shims, but shims are often created ad hoc from whatever material is immediately available.
Laminated shim stock is stacked foil that can be peeled off one layer at a time to adjust the thickness of the shim.
In automobiles, shims are commonly used to adjust the clearance or space between two parts. For example, shims are inserted into or under bucket tappets to control valve clearances. Clearance is adjusted by changing the thickness of the shim.
In carpentry, small pieces of wood may be used to align gaps between larger timbers. In luthiery, shims made of various materials are often used to adjust neck alignment. In masonry, small stones may be used to align or fill gaps between larger bricks or slabs. Special CPU shims are used to protect the central processing unit when installing a heat sink.
In NMR, "Shimming an NMR Magnet" is a procedure to generate homogeneous magnetic field along the sample volume to obtain pure lorentzian line shapes of various resonances in the spectrum. This is accomplished by manual shimming of individual shims, or automatic shimming procedure. 
- Definition in Merriam-Webster Dictionary: http://www.merriam-webster.com/dictionary/shim
- Designing for Tolerance Variations in Product Parts. Weld Fixture Design 101
- "Shimming an NMR Magnet", http://gtfg4.chem.upenn.edu/nmrsite/nmrdw/pdf%20files/Shimming.pdf
- Byrnes, Joe. "To the Point; A Brief History of the Shim." American Fencing Summer 2006: 16.