Let the cost of each shirt for the retailer be C. He bought 1800 shirts and sold 1794 of them. Each shirt was sold for a profit of $20. The price at which it was sold is C + 20. The total amount earned by the retailer is 1794*(20 + C) = $35880 + 1794C.
As 30 more shirts could be bought with this amount than he could buy initially:
35880 + 1794C = 1830C
=> 35880 = 36C
=> C = 996.67
The cost per shirt is $996.67