A kilo of pasta gets you a packet of diapers. A bag of flour buys a bottle of shampoo.

Short on basic supplies, Venezuelans have reverted to ancient shopping habits: bartering whatever they have.

But the tools of the trade are right out of the 21st century: WhatsApp, Facebook and Instagram.

With food and toiletries in ever shorter supply, their smartphones are helping them survive.

"I have diapers, I will exchange them for a kilo of pasta," says a message on one group in the messaging app WhatsApp.

It is one of hundreds on the "Puerta del Bosque Swap Shop," a group of 250 neighbors in Guatire, east of Caracas.

Countless groups like it buzz with messages on various online networks.

"I only have flour. I'll swap it for sanitary napkins," reads one message.

Another says: "My baby has no milk, I need some."

Teaching assistant Plalla Alvarez, 34, says she shares groups with about 400 neighbors on WhatsApp and a further 600 on Facebook.

"We have forgotten what it was like to chat about other matters. All we talk about now is how to get hold of food, toiletries and medicine," she said.

"People are bartering like this all around the country."

Diapers for sugar

Venezuela's economy has plunged in line with the price of the crude oil exports on which it relies, as the government's state-led economy sputters from shortage to shortage.

The situation has worsened in recent months due to inflation and the devaluation of its bolivar currency.

For the best part of two years citizens have had to queue at supermarkets to buy rations of subsidized goods.

"I don't have children, but when I queue up and find there are diapers that day, I buy them and exchange them for things I need, like sugar and soap," said Jophelin Primera, organizer of one online bartering group.

A survey last month by polling firm Datanalisis estimated 80 percent of food goods were in short supply.

As scarcity has risen, so has the black market. Rogue retailers buy up rationed goods and sell them at a markup.

That practice is banned in the online bartering groups.

"The idea is not to make money but to keep yourself supplied," said Primera, a 30-year-old computer specialist.

There are also set hours for exchanging messages so members are not disturbed by the constant beeping of their phones.

"The administrator of the group watches that no one breaks the rules," Primera said.

Cake without eggs

One Facebook group, "United Moms," specializes in baby bottles, formula milk, wet wipes and the like.

In others, users swap hardship cooking tips.

"We have to improvise so we also share recipes: homemade tomato sauce, how to make a cake without flour or eggs or butter," says Primera.

Venezuela's minimum wage is 35,000 bolivars — around $60 at the official exchange rate or $35 at black market rates. A bag of flour from a black market retailer costs 2,000 bolivars.

Maduro blames the crisis on an "economic war."

He accuses business of hoarding goods to provoke unrest in the hope of toppling his government.

The opposition is pushing for a referendum on removing him from power.

Looting and riots have surged in recent weeks as scarcity and political tension have soared.

Users of the online swap shops tend to hand over their goods in public to avoid being tricked and robbed.

"We make an agreement on WhatsApp or Facebook, we send each other photos or tell each other how we will be dressed" at the meet-up, Primera said.

"It's all very well to barter, but it's bad that we should have to resort to that to subsist," she said. "That's disappointing, and sad."