An army of Walmart associates delivering online orders on their way home from work is the latest effort from the world’s largest retailer to speed shipments to customers to combat drone shipping and compete with online retailers like Amazon.

The program is being tested at locations in Arkansas and New Jersey.

"It just makes sense: We already have trucks moving orders from fulfillment centers to stores for pickup," wrote Marc Lore, chief executive of Walmart's e-commerce business. "Those same trucks could be used to bring ship-to-home orders to a store close to their final destination, where a participating associate can sign up to deliver them to the customer's house."

>> Read more trending news

The program is voluntary for employees, and Walmart pays them for the deliveries. Walmart did not share the pay structure in its blog post Thursday about the program. 

“Associates are fully in control of their experience,” Lore wrote. “If they don’t want to participate, they don’t have to. If they choose to opt in, we’ve built technology that allows them to set preferences. Associates choose how many packages they can deliver, the size and weight limits of those packages and which days they’re able to make deliveries after work – it’s completely up to them, and they can update those preferences at any time.”

The company is trying to leverage its largest assets including, 4,700 stores close to population centers and thousands of employees.

The effort comes as the retail giant looks to expand its online sales and compete with Amazon, which is experimenting with different delivery methods, including using drone technology.