in which he instructs us to pray with a congregation, despite that it may include transgressors
A person should always strive to pray in synagogue with the congregation, for the prayer of a congregation is always accepted. Even if it may include transgressors, the Holy One, blessed be He, does not tire of public praying. One should therefore participate in the congregation, and not pray in private when it is possible to pray with the congregation. Left without a choice, when one cannot go to the synagogue, one should aim to pray at the time the congregation is reciting the Eighteen Blessings.
Kitzur Shulchan 'Aruch HaShalem, Part A, section 80, paragraphs 13 – 14, Ahavat Shalom Institute, Jerusalem, 2006