If the capacity is adequate, you can use it. Most refrigerator manufacturers do not recommend using an extension cord. One concern is that you're going to use a cord that can't carry the load without heating up. This can cause a fire hazard.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.