When the friction plus passive forces are not high enough to counteract the pushing force, a shear key can be designed under the wall footing. This structural element will bear laterally against the soil, allowing to extend the passive pressure diagram deeper, as shown in the image above. This is a very efficient way to increase the sliding resistance in a retaining wall. The position of the key along the footing is not very important, but many engineers prefer to place it just under the stem, so that the wall rebars can be extended down into the key.
The factor of safety against sliding is defined as the resisting forces (friction + passive) divided by the driving lateral force, and the minimum value should be 1.50.
As an example, the image below shows the ASDIP RETAIN sliding calculations. Note that the load combinations are based on service loads, since the wall stability is being checked. In this example the safety factor is greater than 1.5 for the load combination shown.