New Zealand's Prime Minister Jacinda Ardern has apologised to the family of British tourist Grace Millane, who was killed a few days into her backpacking trip.

Holding back tears, Ms Ardern said there was an "overwhelming sense of hurt and shame" over what happened to Ms Millane.

The man accused of her murder made his first court appearance on Monday.