A compliance-based code of ethics focuses on preventing unlawful behavior by establishing clear rules, regulations, and penalties for non-compliance. This contrasts with integrity-based codes, which focus on defining core values and encouraging ethical behavior.