It's basically like the link of the 19th century a link and pin coupler.
However, the shackle bar has a hole at each end into which the coupler knuckle pins are inserted after removing both knuckles.
They are likely on the ground, beside the locomotive and cars.
In this photo the brakeman is inserting the knuckle pin in one end of the shackle that has been pushed into the coupler head.
The next step is trickier.
The shackle must be guided into the other coupler head as the cars are moved closer together.
Once in place, the other knuckle pin is then inserted after getting the holes to line up.
Removing the knuckles and putting in a shackle bar as a link enables cars to negotiate a much wider offset on tight curves than they could if coupled with their knuckles.
The stiff shackle is longer than having the knuckles in place and joined,
It can swing the entire width of the openings of both coupler heads if need be.
It's only a temporary set up and no doubt the railroad has specific rules written on how to do this procedure.
The cars will have their coupler knuckles re-installed after all is done and the car is spotted on the siding.
It will be a process to do over again when removing that car from the siding.