A classic example given to this is of vases that are filled with water and put around a fire in order to extinguish it. This is allowed on Shabbat because it is indirect and because the fire might not extinguish.
In civil law
There is a rule that grama benizakin patur. If somebody caused financial harm to somebody else via an action that was not guaranteed to harm them, the person cannot be forced by a court to pay, although he might be morally obligated to.
An action which indirectly causes a Shabbat violation due to grama has a lower level of prohibition than an action which violates Shabbat directly. In situations of great need, a grama violation can be permitted.
Based on this, a variety of electrical devices have been developed which violate Shabbat only through grama, and thus can be used in situations of great need, for example in health care or security.