The Scot, who is the club???s current first-team coach, had two spells with the club as a player, spanning almost nine seasons, ??after initially joining from Rangers in 1995.
In that time the striker scored 72 goals in 273 appearances before re-joining the club in a coaching capacity in 2005, five year after retiring as a player.
The testimonial game for the 43-year-old will take place on August 2 at Goodison Park, with, who finished sixth in La Liga last season, providing the opposition.
Everton played Villarreal in a Champions League qualifying game in 2005 where Ferguson had an apparently fair goal ruled out by referee Pierluigi Collina.