This step is optional. Spray paint your milk crate to match your studio, your guitar or your band/company logo. Or spray paint it flat black to make it as inconspicuous as possible. You may want to lightly sand the surfaces of the milk crate before painting to help the paint bond to the plastic. Alternatively, leave the milk crate as-is with dairy markings and all for that bohemian DIY look.
Determine how many milk crates you need. A standard milk crate is 19 inches wide by about 12 inches tall. A standard rack mount device is 19 inches wide by 1.75 inches high. Things like power amps and equalizers may be twice as high (3.5 inches) or even triple height (5.25 inches) for tube equipment or certain recording modules.
Assuming all of your rack gear is 1.75 inches from top to bottom, you can fit about 6.85 devices in a single milk crate rack. Since you probably don't have .85 of a device in your collection, you can only fit 6. If you need to rack more than six devices, you'll need more than one milk crate.
Determine your hardware needs and purchase hardware. Each rack device will have at least two mounting holes or notches. Larger or heavier ones will have four. Obtain enough screws to anchor all of your devices to the milk crate and pair a spring washer with each screw.
Arrange your equipment in the milk crate so that the devices face up at you and their mounting ears rest on the top edges of the milk crate. Picturing the unit upright, you'll want to "stack" your gear from the bottom up for maximum stability (open space should end up at the top of the rack to avoid creating a top-heavy unit.) Use a fine-point permanent marker to dot where each screw will go.
Run any cables before fastening the gear to the milk crate. Use the crate's rigid, mesh-like structure as a built-in cable organizer when running cables out of the back of the unit (i.e., the "bottom" of the crate.) If any of the racked devices need to be chained together, do this before screwing anything down. Remember to plug in and organize your power cables as well as the signal and/or speaker cables. Also switch on any devices with rear-facing power switches.
Screw each device into the milk crate using a spring washer between the device's mounting ear and the crate. Take your time and do not over-tighten the screws, as plastic can be a difficult material to work with and stripping out your mounting hole can ruin the project. The spring washers will add pressure so you can fasten the devices snugly without having to risk over-tightening.