Two small parts fight brake noise, and they are easy to mix up: the shim and the anti-rattle clip. They do different jobs. Here is the difference between a brake pad shim and an anti-rattle clip.
The shim
A shim is a thin backing plate (metal, rubber, or both) attached to the back of the brake pad. It damps the high-frequency vibration between the pad and the caliper piston that causes squeal; see brake pad shims. Many quality pads come with shims pre-installed.
The anti-rattle clip
Anti-rattle clips (and abutment clips) sit in the caliper bracket where the pad ears rest. They hold the pad with light spring tension so it cannot rattle or move around, and give it a clean surface to slide on; see abutment clips and hardware clips.
Why you need both
The shim quiets pad-to-piston vibration; the clip stops pad-in-bracket rattle and binding. Together they keep the brakes quiet and the pad moving freely - miss either and you get noise or uneven wear.
Replace them with pads
Use the shims that come with the pads and fit fresh clips at every pad change; both are cheap insurance against noise; see new brake noise. Fit quality pads and hardware.