Sayyiduna Abu Hurairah, may Allah be pleased with him, narrates this statement of the Noble Prophet, peace and blessings be upon him: "Either take both of them off or wear both of them, and when you put on your shoes, put on the right one first, and when you take them off, take off the left one first."
(Imam Ibn Hibban, may Allah have mercy on him, says:) The statement of the Noble Prophet, peace and blessings be upon him: "Take both of them off or wear both of them," is for recommendation and guidance, and by this it is meant to prohibit walking with only one shoe or one sock on.