The Justice Zone, or Justice Field, was a reality-altering energy field contained within the holding cells of Justice World, a space prison visited by the boys from the Dwarf in the Series IV episode "Justice".
If anyone attempted a crime within the Justice Zone, the consequences happened to the perpetrator instead of their victim. Dave Lister learned this hard way when, at Arnold Rimmer's insistence, when he tried to set fire to the bedsheets in Rimmer's cell and instead his own jacket started to burn. The thinking was that once the prisoners have served their sentences, being forced to live within the law will have become second nature.
Other examples were if a prisoner stole something, something of theirs went missing; and if they attacked someone else, they felt the pain of their own blows and were injured by their own weapons.
The Justice Zone technology was later utilized in the creation of the Karma Drive, which propelled a ship, the SS Samsara, and rewarded good behaviour while punishing bad behaviour based on the moral code that had been programmed into the drive. ("Samsara", Series XI)