Reuven and Shimon are not frum Jews. Reuven hired Shimon to do work on Shabbos. Next week, Reuven became frum. Shimon demands to be paid for the work he did. Can Reuven pay him for working on Shabbos? It is schar Shabbos.
It is sechar Shabbos but nevertheless Reuvain has to give shimon the money. The reason being, that it will be chillul H-shem for him to tell him, Now that I am religious, I am not paying you”. What he can do, is to tell Shimon, “according to halacha I may not be obligated to pay you, therefore I am giving you the money as a present” and then he should give him the money.
Heard from Horav Y. Zilberstein shlit”a. See Shevet Hakehosi 3-338 who says that it would be permitted to give him the money even as pay, because it is permitted to give sechar Shabbos for a mitzva, and in this case where it would be a chilul H-shem not to pay him it would be permitted.