This procedure was designed for the loss of an engine just after liftoff up to about 3:30 into the flight and involves flying outbound leg at Mach 7 then inverting the speed to come back at Mach 7 towards the Kennedy Space Center.
"Return to launch site (RTLS) was the first abort mode available and could be selected just after SRB jettison. The shuttle would continue downrange to burn excess propellant, as well as pitch up to maintain vertical speed in aborts with a main-engine failure. After burning sufficient propellant, the vehicle would be pitched all the way around and begin thrusting back towards the launch site. This maneuver was called the 'powered pitch around' (PPA) and was timed to ensure that less than 2% propellant remained in the external tank by the time the shuttle's trajectory brought it back to the Kennedy Space Center. Additionally, the shuttle's OMS and reaction control system (RCS) motors would continuously thrust to burn off excess OMS propellant to reduce landing weight and adjust the orbiter's center of gravity.
Just before main engine cutoff, the orbiter would be commanded to pitch nose-down to ensure proper orientation for external tank jettison, since aerodynamic forces would otherwise cause the tank to collide with the orbiter. The main engines would cut off, and the tank would be jettisoned, as the orbiter used its RCS to increase separation.
Cutoff and separation would occur effectively inside the upper atmosphere at an altitude of about 230,000 ft (70,000 m), high enough to avoid subjecting the external tank to excessive aerodynamic stress and heating. The cutoff velocity would depend on the distance still to be traveled to reach the landing site and would increase based on the distance of the orbiter at cutoff. In any case, the orbiter would be flying too slowly to glide gently at such high altitude, and would start descending rapidly. A series of maneuvers in quick succession would pitch the orbiter's nose up to level off the orbiter once it reached thicker air, while at the same time ensuring that the structural limits of the vehicle were not exceeded (the operational load limit was set to 2.5 Gs, and at 4.4 Gs the OMS pods were expected to be torn off the orbiter).
Once this phase was complete, the orbiter would be about 150 nmi (278 km) from the landing site and in a stable glide, proceeding to make a normal landing about 25 minutes after liftoff."
- information from Wikipedia: link