Hey, check out "Oxford Press"
the right sentences in written English are:
1) DOING the shopping, we went back home.
2) HAVING DONE the shopping,we went back home.
3)AFTER DOING shopping, we went back home.
it is NOT right "after having done shopping".
RULES:
a) When there are 2 short actions, one straight after the other, we can use an -ing form for the first action.
Opening the bottle, Mark poured the drinks (= he opened the bottle and then poured the drinks).
But we can use the perfect -ing form as well.
Having opened the bottle, Mark poured the drinks (= after opening the bottle, Mark poured the drinks).
b) IF EITHER OF THE ACTIONS IS LONG, WE MUST USE THE PERFECT.
HAVING PHOTOCOPIED all the papers, she put them back in the file.
The structures "1", "2", "3" are typical of written English.
In SPOKEN ENGLISH , to talk about one action after another we use a sentence like this:
I opened the bottle and then poured the drinks.
In conclusion, in your own situation, the best forms are the number "2" and "3".
I hope it helps.