The correct option is D shed
The word that has same meaning as the italicized word of both the sentences is option D, shed. Shed means a hut or an outhouse. It is also used when we want to say that something is producing light. Context of sentence I is that Stars produce or shed light. Sentence II means poor farmer lived in a shed. Option A, 'shred' means to chop finely or grind. Option B 'shade' means slight darkness caused when the sun is obstructed by an object. Option C 'cote' is a shelter for animals. Thus, options A, B and C are incorrect to be sued in both the sentences together. The correct answer is option D, shed.