Turn your water supply off by closing the home's main water line near the water heater. Remove the shower handle by unscrewing the handle screw at the base of the faucet's handle with an Allen wrench, and pulling back on the handle.
Remove the washer under the handle by hand. Turn the bonnet cap under the handle counterclockwise by hand or with a pair of pliers to unscrew and remove it.
Take out both screws in the shower's trim cap -- called the escutcheon -- and lift this part off of the wall. Remove the two screws in the trim cover beneath the trim plate with a screwdriver and remove the trim cover.
Take the cartridge out of the body of the faucet with a pair of pliers. Replace the cartridge with a new one designed for the Kohler KT10582-4P-AF faucet. Replace all parts removed in the reverse order as taken off.