Have you gone shopping this week?
Have you gone shopping 【你去买过】 this week 【这周】?
你这周去买过东西吗?(Don't like 了 instead of 过 here)
Your sentence is a kind of double question: How many? and Have you?
English accepts:
This week how many times have you gone shopping?
How many times this week have you gone shopping?
How many times have you gone shopping this week?
Chinese accepts: (please correct me if I'm wrong.)
你这周去买了/过几次东西?
这周你去买了/过几次东西?
How many times [have you gone shopping] this week?
How many times 【几次】have you gone shopping 【你去买了】 this week 【这周】?
你这周去买了/过几次东西?
你这周几次去买了/过东西。(don't like this one, wrong association of 几次)
几次 asks 'how many times'. 去买 is an event that can repeat itself.
东西 are just things, not an event that can repeat.
English: How many times 【几次】have you gone shopping 【你去买了】
Chinese: Have you gone shopping 【你去买了】how many times 【几次】