The correct end is presupposed. But the ends themselves seem to require prudence. Perhaps the answer to this paradox is that virtuous habits can be acquired little by little through proper education and obedience to just laws. Those habits give rise to a certain amount of prudence which then allows the person to be more virtuous and so on. Thus the relationship between ethical virtue and prudence can best be characterized as an inward spiral which little by little reaches the center, which is a virtuous life.
Wisdom is connected to prudence as health is to medicine.
Wisdom is the superior of the two, and prudence is a means to wisdom as medicine is a means to health. The prudent man considers how wisdom is acquired and prescribes his actions in order to acquire it.