And nearly a quarter of a million used a credit card or loan to pay gas, electricity or water bills.
Young people are the most likely to have borrowed money for grocery shopping, with more than one in five (21%) in the 18-24 age group, and around one in six (16%) in the 25-34 age group, using some form of credit to buy food.
However, 35-44s were most likely (8%) to have borrowed to pay utility bills, followed by people in the 55-to-65 age group (7%).
Ian Williams of Debt Advisory Centre Scotland commented:
"The cost of food, gas and electricity has soared over the past few years. Many people use credit cards to buy food every day - sometimes to benefit from loyalty schemes and sometimes just to make ends meet. But unless you pay off your credit card balance in full every month, you are likely to be paying high charges on every pound you borrow. This could easily wipe out any savings you make by shopping carefully.
The fact that so many people are having to borrow to meet their utility bills during the summer - when heating bills are usually lower - could signal real trouble approaching this winter.
Most of us need to borrow a little money from time to time, but borrowing to pay for essentials such as food and utilities could be a sign that you are struggling financially.
If you are having problems making your money stretch, try drawing up a budget - the DACScotland website offers tips on how to do this (http://www.dacscotland.co.uk/money-help/budgeting/), helping you work out where your money is going and how you can cut costs.
And if you are worried you won't be able to afford to heat your home this winter or are struggling to pay bills, contact your provider to explain the situation and see if they can offer you a cheaper tariff or agree a plan to spread the payments.
"If that doesn't help, then you should seek expert advice."