Okay, I just found the answer to it.
pathState = new joint.shapes.basic.Path ({
size: { width: 200, height: 100 },
attrs: {
path: { d: 'M 25 0 L 175 0 200 25 200 50 200 75 175 100 25 100 0 75 0 25 z' },
text: {
text: 'Octagon',
'ref-y': .5
}
}
});