Try it like this instead:
$game_temp.shop_goods = [[0,5], [2,4], [1,3], ..., [type, id]]
where type is 0, 1, or 2 connoting item, weapon or armor; and id is the ID of the item you want.
Also, you the
$game_temp.next_scene = "shop"
will only work if it's coming out of Scene_Map.
Otherwise, you will need to use:
$scene = Scene_Shop.new