Pentagastrin is a synthetic pentapeptide that stimulates gastric acid, pepsin, and intrinsic factor secretion. It binds to cholecystokinin-B receptors in the brain and activates phospholipase C, stimulating the release of these gastric factors. Pentagastrin is used diagnostically to test for low acid output in conditions like pernicious anemia or after gastric surgeries. It is administered via injection, with effects seen within 10-30 minutes, to stimulate maximum acid secretion for diagnostic purposes.