shields and sketches

if I choose one of wifi sheilds the sketch is dependent from that?

Yes, the hardware (shield) and software/firmware (sketch) are independent.

But of course, you need both to work. And, you’ll need some Wi-Fi code to make the WiFi shield do anything.