Codes of Ethics

What are the main purposes of the codes of ethics for helping professionals? How can you use the codes of ethics to guide your ethical decision making?