The word 'while' refers to two actions that are happening simultaneously. The first action "was doing the shopping" is a continuous one. Hence the second action (in the blank) must also be in the same tense form. Both actions should be parallel in terms of tense.
Options A and B: "Were playing" is a continuous action in the past that coincides with the first action. Hence this is the correct option.
'Played', on the other hand, is in the simple past tense, and isn't an appropriate option.
Option C: 'Have played' is in the present perfect tense and does not go simultaneously with the past continuous tense.
Option D: 'Have been playing' is in the present perfect continuous tense and isn't parallel with the first action.
Hence options C and D are incorrect.