Consider a gas which expands adiabatically and reversibly. Since there is no heat in the process, the gas transform some of it's internal energy into work. As no entropy is exchanged or created, the entropy of the gas is constant.
Now, suppose we use the work given in the expansion to power a refrigerator. Assuming the refrigerator works in a cycle it creates no entropy. However, since refrigerator transfers heat from a cold reservoir to a hot one, this would mean a reduction in entropy.
In total, we obtain a reduction in entropy. Doesn't this violate the 2nd law of thermodynamics? If it does what is wrong with this scenario? I know that this cannot be done forever since our original gas cylinder ends up in a different state.