In Hebrew and several other Semitic languages, shofet (plural shoftim) literally means "Judge", from the verb "Š-P-T", "to pass judgment". Cognate titles exist in other Semitic cultures, notably Phoenicia.
In the Bible, the shoftim were chieftains who united various Israelite tribes in time of mutual danger to defeat foreign enemies. See Book of Judges for more details.
In the various independent city states constituting Phoenicia proper (coasts of present Lebanon and Syria) and its "Punic" Mediterranean colonies a shofet (in Punic, suffet or suffete) was a non-royal magistrate granted control over a city-state, sometimes functioning much in the same way as a Roman consul.
The term is mostly widely known from the suffetes of Carthage, a former Phoenician colony. Following the overthrow of its monarchy in the 400s BC, Carthage was ruled by a number of aristocratic councils presided over by two suffetes, who served in similar capacity to Roman consuls.
(incomplete)