If you must stop in the shortest distance for an emergency, depress the brake pedal to its maximum. However, with this method you will lose your steering control.
Without anti-lock brakes
If your vehicle doesn’t have anti-lock brakes, slamming on the brakes will lock your wheels. If all four wheels are locked, the vehicle will likely slide in the direction it was already going. Remember, without an anti-lock braking system, when your brakes are locked, you have very little steering control (if any at all), so do this only in an emergency.
An alternative method is to apply steady brake pressure without locking up the wheels. This is called threshold braking and requires practice and skill in order to perform properly. The advantage here is you maintain steering control as you come to a stop and you may be able to steer around an object rather than having a collision.
With anti-lock brakes
Anti-lock braking systems will provide some degree of steering control when the brakes are fully applied. The amount of control will depend on the specific system, so check your owner’s manual for the best advice to follow.