1 Samuel 6:5

Wherefore ye shall make images of your emerods, and images of your mice that mar the land; and ye shall give glory unto the God of Israel: peradventure he will lighten his hand from off you, and from off your gods, and from off your land.

The counsel was to send back the ark belonging to Israel with a trespass offering, recognizing that God's hand was upon the Philistines because they had taken it. The offering was to be costly, made of golden images representing the emerods or tumors that afflicted the people and the mice that ravaged and marred the land. Making such images followed a custom of presenting images of afflicted body parts as offerings to a god. The images corresponded in number to the five Philistine lords, since the plague had affected both the people and their rulers.

By making the images and giving glory to Israel's God, the Philistines acknowledged Him as the source of their afflictions and destruction. His presence with the ark had brought judgment upon them and upon their idol Dagon. The offering was intended to appease God's wrath and bring relief, in the hope, not the certainty, that He would lighten His hand of judgment from off them, from off their gods, and from off their land.