A duodenum membrane device, for treating obesity or diabetes made of biodegradable shape-memory biocompatible materials, and comprising a soft, smooth, elastic and plastic ampulla 1 at one end and a soft, smooth, elastic and plastic tubular portion 5 at the other end. The ampulla 1 is adapted for positioning in or proximal to the duodenum bulb. The tubular portion 5 is of a length adapted for extending from a region proximal to the duodenum bulb to the jejunum and separating the contents in the interior of the tubular portion 5 from the bile and pancreatic juice for the duration that the contents are in the interior of the tubular portion 5. The ampulla 1 and the tubular portion 5 are adapted to be compressible into a spherical or capsular form. The ampulla 1 includes a stretch yarn 2 and an anchor hook 3 on its external encircle adapted for non-surgical implantation of the device. The duodenum membrane device is capable of being degraded in vivo over two months to five years duration.