My hubby had a problem with a pair of shoes he bought from M & S.
He had them for about 6 months and they split across the sole - he didn't realise until his foot got very soggy in the rain!! He had hardly worn them and you could see this,
He contacted them (they were bought from website), sent them off for examination (!) and got fully refunded about 30 days later.
Thinking it might be a one off he bought another pair with a similar style sole but the same thing happened and again he got a refund.
I don't know the law on this but take them to the shop but be prepared to have to have them sent off.
Also I suppose it depends on the shop, some have better customer service than others!!