An electrical device, comprising: a case formed in a rectangular parallelepiped shape with base sides thereof having the largest area, one of the base sides being open to define an opening portion, the other of the base sides being closed by a bottom wall; and a capacitor installed in the case, wherein the electrical device further comprises: a heat sink plate made of a metal material and disposed on the opening portion of the case such that an inner surface of the heat sink plate faces the capacitor; a fastening part adapted for screw fastening and provided on an outer surface of the heat sink plate opposite from the capacitor, the fastening part comprising a nut made of a metal material; and a circuit board attached by a screw to the fastening part; the heat sink plate is electrically connected to a metallic frame by which the electrical device is fixed; the circuit board has: a circuit pattern provided on a pattern surface of the circuit board opposed to the outer surface of the heat sink plate, the pattern surface on which the circuit pattern facing the capacitor with the heat sink plate interposed between the pattern surface and the capacitor; a screw through hole formed through the pattern surface so as to allow insertion therethrough of the screw tightened to the nut; and a pattern for grounding the circuit pattern, provided at a hole edge of the screw through hole on the pattern surface of the circuit board; and an area of the outer surface of the heat sink plate oriented along the opening portion of the case is larger than an area of the pattern surface of the circuit board oriented along the opening portion of the case. a case formed in a rectangular parallelepiped shape with base sides thereof having the largest area, one of the base sides being open to define an opening portion, the other of the base sides being closed by a bottom wall; and a capacitor installed in the case, wherein the electrical device further comprises: a heat sink plate made of a metal material and disposed on the opening portion of the case such that an inner surface of the heat sink plate faces the capacitor; a fastening part adapted for screw fastening and provided on an outer surface of the heat sink plate opposite from the capacitor, the fastening part comprising a nut made of a metal material; and a circuit board attached by a screw to the fastening part; the heat sink plate is electrically connected to a metallic frame by which the electrical device is fixed; the circuit board has: a circuit pattern provided on a pattern surface of the circuit board opposed to the outer surface of the heat sink plate, the pattern surface on which the circuit pattern facing the capacitor with the heat sink plate interposed between the pattern surface and the capacitor; a screw through hole formed through the pattern surface so as to allow insertion therethrough of the screw tightened to the nut; and a pattern for grounding the circuit pattern, provided at a hole edge of the screw through hole on the pattern surface of the circuit board; and an area of the outer surface of the heat sink plate oriented along the opening portion of the case is larger than an area of the pattern surface of the circuit board oriented along the opening portion of the case. a heat sink plate made of a metal material and disposed on the opening portion of the case such that an inner surface of the heat sink plate faces the capacitor; a fastening part adapted for screw fastening and provided on an outer surface of the heat sink plate opposite from the capacitor, the fastening part comprising a nut made of a metal material; and a circuit board attached by a screw to the fastening part; the heat sink plate is electrically connected to a metallic frame by which the electrical device is fixed; the circuit board has: a circuit pattern provided on a pattern surface of the circuit board opposed to the outer surface of the heat sink plate, the pattern surface on which the circuit pattern facing the capacitor with the heat sink plate interposed between the pattern surface and the capacitor; a screw through hole formed through the pattern surface so as to allow insertion therethrough of the screw tightened to the nut; and a pattern for grounding the circuit pattern, provided at a hole edge of the screw through hole on the pattern surface of the circuit board; and an area of the outer surface of the heat sink plate oriented along the opening portion of the case is larger than an area of the pattern surface of the circuit board oriented along the opening portion of the case. a circuit pattern provided on a pattern surface of the circuit board opposed to the outer surface of the heat sink plate, the pattern surface on which the circuit pattern facing the capacitor with the heat sink plate interposed between the pattern surface and the capacitor; a screw through hole formed through the pattern surface so as to allow insertion therethrough of the screw tightened to the nut; and a pattern for grounding the circuit pattern, provided at a hole edge of the screw through hole on the pattern surface of the circuit board; and an area of the outer surface of the heat sink plate oriented along the opening portion of the case is larger than an area of the pattern surface of the circuit board oriented along the opening portion of the case.