A heartless carer who "shamefully" stole prescription painkillers from a woman dying of cancer has been spared jail so she can "start afresh".