Through robbery, or through shaming his friend in public, a person's prayer is not heard.
Sefer HaMidos, Prayer, Part I §47