You can go to the café "La Boussoule". At the end of the town you go out of it and you find the café on a little dune, last buildings in direction of the desert. They have an old camping place that looks like a castle. Ask the owners, they should let you sleep in the castle in exchange of cleaning it. (Mars 2014). There must be also a guy looking for volunteers somewhere in the oasis. He try to grow plants with salt water.
There are food shop in M'hamid.
Some café or hotel have wifi. Café "La Boussole" have a slow but working wifi.
M'hamid is the last town on the road from Zagora to the desert. A lot of people go there just to find an excursion to the desert. You can see little dunes from there, and walk to the dunes in 5-10 minutes. There is also an oasis with fields, and a nice casbah. The big dunes of Chigaga are 60km away.