No, it is an anti-spasmodic medication for the bowels. It does cause drowsiness, though. It can stop the pain if it stops the spasms, but it is not specifically a pain medication, no.
Bentyl is an anti-spasm med that is typically used to diminish the bowel spasms that can result in pain.