Stochastic background of Gravitational waves as a Benchmark for Extended Theories of Gravity