Full Idea
Instead of the sublime maxim of reasoned justice 'Do unto others as you would have them do unto you', pity inspires a less perfect but perhaps more useful one: 'Do what is good for you with as little harm as possible to others'.
Gist of Idea
The better Golden Rule is 'do good for yourself without harming others'
Source
Jean-Jacques Rousseau (Discourse on the Origin of Inequality [1754], Part I)
Book Reference
Rousseau,Jean-Jacques: 'The Basic Political Writings', ed/tr. Cress,Donald A. [Hackett 1987], p.55
A Reaction
His revised maxim is like J.S. Mill's formula for liberalism. The first maxim seems more contractarian, the second more utilitarian.