When the word Elohim is used in the singular it generally refers to God as the Supreme judge and a singular God. When it is used in the plural form it refers to judges, magistrates, angels in their role as judges, and kings in their role as judges.
While the Catholic encyclopedia would like you to believe it is being used as a metaphor because it is also used for judges, angels and kings it, the Catholic church, also agrees with the judge references.